Lai*_*uan 5 php system external
我试图在php脚本中编译我的latex文件,但它无法调用xelatex.
在PHP脚本中:
system("/usr/bin/whoami");
system("/usr/bin/xelatex foo.tex 2>&1");
Run Code Online (Sandbox Code Playgroud)
输出:
myuser
sh: 1: /usr/bin/xelatex: not found
Run Code Online (Sandbox Code Playgroud)
但在我的终端:
$ /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)...
Run Code Online (Sandbox Code Playgroud)
我运行php as myuser,并传递system()绝对路径.然后我就关掉safe_mode了.为什么我还不能执行外部程序?
| 归档时间: |
|
| 查看次数: |
338 次 |
| 最近记录: |