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

```
@Sergejs Rižovs answer is already hit the spot, but it seems that your command may not actually correct. take a look at [here](http://ss64.com/nt/path.html) for more reference about set path command