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

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

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

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -