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

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -