-f
Usage
c:\php\php -f
or
c:\php\php
-F
## in the PHP file The two variables #argi can do a lot of things with this parameter, such as executing different program codes based on the user's keyboard input, which is very interesting.
Knowledge point: argn represents the content of the line currently entered in the PHP command line, and
argi represents the line number. For a single line, you can understand how many times it is entered.
-i: This command line parameter will call the phpinfo() function and display the results. If you execute this parameter as php-cgi.exe, the difference between php.exe and php-cgi.exe is that when php-cgi executes this command parameter, the input is in HTML format, while php.exe is expressed in variable form, which is concise Much clearer.
Usage
c:\php\php -i
-l: Perform syntax check on the specified PHP code. In fact, this command line parameter is useless. It is fatal The error cannot be detected, which is why I did not use this parameter of php.exe when configuring the syntax checking tool of Editplus. Note: This parameter cannot be used with -f.
Usage
c:\php\php -l
-m: This command line parameter is mainly used to output built-in and loaded PHP and Zend module
Usage
c:\php\php -m
-v: This command line parameter is mainly used to output the version information of PHP and Zend
Usage
c:\php\php -v
–ini: This command line parameter is mainly used to output the location information of the PHP configuration file
Usage
c:\php\php -r "code"
–ini: This command line parameter is mainly used to output the location information of the PHP configuration file
Usage method
c:\php\php --ini
At this point, the basic usage and common parameters of the PHP command line execution program php.exe have been introduced.
We know the PHP program The running mode is usually run on the web page, but in fact, the PHP script program can be run independently through the PHP command line.
Reasonable use of php.exe can achieve many functions, such as the plan we have always been obsessed with Task,
can completely execute the corresponding PHP program on the Windows platform by calling the PHP command line program php.exe in batch mode.
php.exe program directly requests the url
##What is the use of php.exeQuestions about php.exeThe above is the detailed content of PHP execution program php.exe parameter analysis. For more information, please follow other related articles on the PHP Chinese website!