The following code will capture both the normal output (from StdOut) and the error output (from SdtErr).
exec('ln -s ' . PLUGIN_DIR . '/.htaccess ' . ABSPATH . '/.htaccess 2>&1',$output);
var_dump($output);
The following code will capture both the normal output (from StdOut) and the error output (from SdtErr).
exec('ln -s ' . PLUGIN_DIR . '/.htaccess ' . ABSPATH . '/.htaccess 2>&1',$output);
var_dump($output);