我试图在php脚本中编译我的latex文件,但它不能调用xelatex
。无法通过system()执行外部程序?
在PHP脚本:
system("/usr/bin/whoami");
system("/usr/bin/xelatex foo.tex 2>&1");
输出:
myuser
sh: 1: /usr/bin/xelatex: not found
但在我的终端:
$ /usr/bin/whoami
=> myuser
$ /usr/bin/xelatex foo.tex
This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
...(successful output)...
我运行PHP作为myuser
,并通过system()
绝对路径。我关闭safe_mode
。为什么我还不能执行外部程序?
什么是你的PHP文件的chown和chgrp?并且还有权限 – safarov 2012-03-19 07:27:44