开发者

exec() or system() on doxygen command returns me "Exiting"

开发者 https://www.devze.com 2022-12-16 02:03 出处:网络
Itry to run this script public function execDoxygen($doxyFile) { 开发者_Python百科$command = \"doxygen $doxyFile\";

Itry to run this script

public function execDoxygen($doxyFile) {

开发者_Python百科    $command = "doxygen $doxyFile";

    exec($command, $output);

    return $output;
}

and the outputs is "Exiting..."

if I run it separetely in a terminal with the same file it works well.

If I run exec("doxygen --help") it works correctly.

Why does it not work with a variable?


If it contains spaces or other shell special characters, you may need to escape $doxyFile with escapeshellarg() first.

Edit for the record, it was a permission problem. See the comments for details.

0

精彩评论

暂无评论...
验证码 换一张
取 消