How to retrieve PHP exec() error responses?

后端 未结 7 1603
孤街浪徒
孤街浪徒 2020-12-15 03:42

Below is the command I tried executing, without success:

exec(\'ln -s \' . PLUGIN_DIR . \'/.htaccess \' . ABSPATH . \'/.htaccess\');

When y

7条回答
  •  一生所求
    2020-12-15 04:16

    You can receive the output result of the exec function by passing an optional second parameter:

    exec('ln -s ' . PLUGIN_DIR . '/.htaccess ' . ABSPATH . '/.htaccess',$output);
    var_dump($output);
    

提交回复
热议问题