Question: How to run php in cmd.. I tried to run it using php filename.php by giving correct for that php file.. but i got the error as,

**'php' is not recognized as an internal or external command,
operable program or batch file.**

Answer: 
You should check if you have path to PHP in your Environment Variables.

```
"My Computer" > "Properties" > "Advanced" > "Environment Variables" > "Path"

```

Or you could use command line for that. Make sure to set actual path.

```
set PATH=%PATH%;C:\path\to\php

```
This is probably meant for super user, but regardless I will answer it. 

This is since you don't have php installed. I would suggest installing Cygwin, and installing PHP into that. More info on this [here](http://www.garethhunt.com/2008/02/06/php-and-cygwin/).