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
Post a Comment