我正在使用set_include_path()
添加到 PHP 搜索路径,以便服务器可以找到 gs 可执行文件。当我从命令行(即“ php testpath.php
”)运行脚本时,事情按预期工作,但是当我从本地主机(Mac OSX 10.11.5)上的浏览器调用脚本时,它找不到可执行文件。该testpath.php
文件是:
$path = '/usr/local/octave/3.8.0/bin';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
system("which gs");
我需要做些什么来让这个脚本工作,以便它可以从浏览器调用中找到 gs 可执行文件?谢谢!