0
命令的呼唤:为什么php exec()失败.tex→xelatex→.pdf,但成功.tex→xelatex→.xdv→xdvipdfmx→.pdf?
$dir = "/path/to/source/file";
exec("cd $dir;xelatex filesource.tex", $output_array[0]);
总是失败,但:
$dir = "/path/to/source/file";
exec("cd $dir;/usr/texbin/xelatex -no-pdf filesource.tex", $output_array[0]);// now we have .xdv file
exec("cd $dir;/usr/texbin/xdvipdfmx filesource.xdv", $output_array[1]);
成功,并导致.pdf文件绝对有效。有什么窍门?
这似乎并没有太多做PHP或系统调用,什么都做乳胶的路径。我建议你问问[tex.se] – 2013-10-29 03:02:40
这不是一个纯粹的乳胶问题,因为这是一个关于系统调用用户_www的命令的问题,具有不可预知的行为。 –