Many friends find it strange how to run
php script under cmd. In fact, it is just a script
It is actually quite simple.
My phpinstallation directory is in d:\php
Then run
cmd
>d:
>cd php
Let the working directory point to the installation folder of php.exe
Then you can use php Instructions
For example, create a new test.php under the folder
echo "test";?>
>php test.php
See The operation was successful.
The above is the detailed content of How to run php script under cmd?. For more information, please follow other related articles on the PHP Chinese website!