How do I run PHP from CMD?

secretbonus

Junior Member
Joined
Mar 24, 2009
Messages
103
Reaction score
31
Okay, so I'm trying to use the adwords API so I can extract a huge keyword list like the one on xedant.com. Now I followed the video tutorial except the problem is when I try to run php on command prompt it says "php is not recognized as an internal or external command, operable program or batch file"
what do I need to do so that I can run php command C:\example>php filename.php
?
 
You need the PHP-CLI package. In linux, you can just compile php with the --enable-cli flag, but I am not too sure about windows. Check out http://php.net/features.commandline for more info.
 
C:\php\bin\php <scriptname.php>

On Windows that's typically how you run a PHP CLI script.
 
Back
Top