我正在尝试使用 PHP exec()
二进制 casperjs
,
exec('casperjs /var/www/mysite/application/phantomjs/test.js');
但是我得到了错误
Fatal: [Errno 2] No such file or directory; did you install phantomjs?
CasperJS 运行在 PhantomJS 之上,我在 /usr/local/bin/phantomjs
和 /usr/local/bin/casperjs
手动安装并创建了一个链接>。所以我猜 casperjs 在运行时会调用 phantomjs。
但是当我 ssh 进入服务器并运行时它工作正常
casperjs /var/www/mysite/application/phantomjs/test.js
出了什么问题?我认为 casperjs
不能以网络用户身份运行 phantomjs
?如果这是真的,如何解决?
最佳答案
我遇到了完全相同的问题并在这里找到了有效的解决方案:https://groups.google.com/forum/?fromgroups=#!topic/casperjs/92yUM9O0XjA
关于php - 使用 PHP 的 exec() 给出错误 : Fatal: [Errno 2] No such file or directory; did you install,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14130311/