0

I've installed coffee-script module globally (with -g key). I can use it from terminal. But php can't do it with exec command. There is no output in exec command and no compiling.

In Windows i moved node_modules folder to Program Files instead /LocalRoaming, and then PHP can use coffee command. How to do it in OSX? Coffee bin path is: /usr/local/lib/node_modules/coffee-script/bin/

4

1 回答 1

0

exec() 只返回输出的最后一行——这可能是空白的。将第二个和第三个参数作为引用传递给它,并在运行 exec() 后 var_dump 它们的内容。第三个参数至少会产生程序的退出代码。

做不到这一点 - 试试 shell_exec()。

于 2013-10-14T19:55:37.217 回答