Home  >  Article  >  Backend Development  >  How to run php files using cmd

How to run php files using cmd

藏色散人
藏色散人Original
2019-11-13 10:50:014319browse

How to run php files using cmd

How to run php files using cmd?

Run PHP in the command line mode in the CMD window, first confirm that PHP is already in the environment variable

Recommended: "PHP Tutorial"

How to run php files using cmd

php [-f] "File name"

The above command can run the PHP file in the CMD window

How to run php files using cmd

Code example, write a simple PHP file

How to run php files using cmd

CD command switches the working directory to the path where the PHP file is saved

How to run php files using cmd

php -f "File name" Run the instance

How to run php files using cmd

php "File name" Run the instance

How to run php files using cmd

The above is the detailed content of How to run php files using 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