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

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -