Question

Itry to run this script

public function execDoxygen($doxyFile) {

    $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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top