Reputation: 291
I need to run node js command from my php file. I am using exec() to do this. Here is my script
<?php
$ret = exec("node -v", $out, $err);
echo print_r($out);
?>
Here I am getting return value 1. How to fix this?
Upvotes: 0
Views: 1600
Reputation: 43
http://php.net/manual/de/function.exec.php
Short summary:
So 1 means "Miscellaneous errors", have you tried running the command in the shell to see what happens?
Upvotes: 1