system() not returning result?
Posted: Thu May 13, 2010 3:56 pm
I have a Python script that I'd like to display the results of in PHP. This is my code:
The result is "no". I double-checked the command, and it's correct.
The strange thing is, this works:
That displays the Python help text, followed by "yes".
Does anyone know what's going on? How can I capture the result?
Code: Select all
if(system("python /Volumes/code/code/_sendrender/_outputstatus.py")) {
echo "yes";
} else {
echo "no";
}The strange thing is, this works:
Code: Select all
if(system("python -h")) {
echo "yes";
} else {
echo "no";
}Does anyone know what's going on? How can I capture the result?