Is pdflatex in the search path? Perhaps try specifying the full path to the executable and see if that makes a difference.
Getting exec() PHP to work like it does on the command line
質問
The following command, which generates a .pdf file from a .tex file, works from the command line but not when I run it with PHP. The file has the appropriate permissions and I'm able to run other commands with exec()
so not sure what is going on.
$file_path='uploads/some-path';
$full_path='uploads/some-path/file.pdf';
$cmd ="pdflatex -output-directory ".$file_path.' '.$full_path;
exec($cmd);
The flag -output-directory
place the file in the file_path
rather than the root directory.
解決
所属していません StackOverflow