I have made a webserver in python, and I am trying to add PHP support to it;
This outputs, for example:
I then execute it with:
But when the command is executed, I always get:
Any ideas?
<edit>
Fixed, turned out that commands.getoutput() isn't supported on windows
Code:
cmd = '"'+path_to_php+'" '+hostfiles+file
This outputs, for example:
Code:
"E:/Servers/Abyss/PHP5/php-cgi.exe" E:/programming/python/httpd/subfolder/2/phptext.php
I then execute it with:
Code:
contents = commands.getoutput(cmd)
But when the command is executed, I always get:
Code:
'{' is not recognised as an internal or external command, operable program, or batch file.
Any ideas?
<edit>
Fixed, turned out that commands.getoutput() isn't supported on windows
Last edited:






