javascript - PHP exec command node -


i'm running apache , node.js on same server. tried execute command using php:

exec('usr/bin/node', 'var/www/html/app/node/server.js'); var_dump($output); 

it returned:

"array(0) {}"; 

do have idea why php did not execute command node?

thank help.

try absolute paths:

exec('/usr/bin/node /var/www/html/app/node/server.js', $output);

usr/bin/node relative path meaning appended current directory php script executed in.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -