In fact, it is quite simple
My php installation directory is in d:php
Then run
cmd
>d:
>cd php
to make the working directory point to php.exe The installation folder
and then you can use the php command
For example, create a new test.php under the folder
>php test .php
See if it runs successfully.