php shell_exec casperJS

php shell_exec casperJS,php,linux,Php,Linux,我在linux机器上安装了phantomJS和casperJS,并在/usr/local/bin/casperJS和/usr/local/bin/phantomJS中添加了符号链接。如果我通过ssh登录,一切都会正常工作 但我想用shell_exec在php脚本中调用casperjs: shell_exec('/usr/local/bin/casperjs'); 我还向我的php中添加了include_路径: .:/usr/local/bin/casperjs 但是我从exec命令中只得到“N

我在linux机器上安装了phantomJS和casperJS,并在/usr/local/bin/casperJS和/usr/local/bin/phantomJS中添加了符号链接。如果我通过ssh登录,一切都会正常工作

但我想用shell_exec在php脚本中调用casperjs:

shell_exec('/usr/local/bin/casperjs');
我还向我的php中添加了include_路径: .:/usr/local/bin/casperjs


但是我从exec命令中只得到“NULL”作为输出-这是怎么做到的?有人能帮忙吗?如何在webhost目录中使用casperjs,该目录位于/var/www/?

我认为这是因为
casperjs
生成一个新的子目录,并使用
exec()
var\u dump()
返回instantlyTry以查看返回的内容<代码>shell_exec()在执行时出现任何类型的问题时返回
NULL