How to retrieve PHP exec() error responses?

后端 未结 7 1601
孤街浪徒
孤街浪徒 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);
    
    0 讨论(0)
提交回复
热议问题