Jump to content

Command Line PHP


Recommended Posts

OK, so I am trying to run php using a python script, It isn't working for me..

 

Here is what I have:

import commands
root = 'C:\root'
self.wfile.write(commands.getoutput('php ' + root + '\file.php'))

 

And here is my error output:

'{' is not recognized as an internal or external command,

operable program or batch file.

 

The php file that I am trying to execute looks like this:

 

<html>

<?php echo 'hello'; ?>

</html>

 

I don't see what is wrong...

Link to comment
https://forums.phpfreaks.com/topic/147656-command-line-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.