Home >Backend Development >PHP Tutorial >How to run php script under cmd?

How to run php script under cmd?

怪我咯
怪我咯Original
2017-07-06 09:40:302227browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn