Home > Backend Development > PHP Tutorial > A Deep Dive into PHP Command Line Parameters_PHP Tutorial

A Deep Dive into PHP Command Line Parameters_PHP Tutorial

WBOY
Release: 2016-07-15 13:32:01
Original
782 people have browsed it

In this article we will explain in detail about

When the user opens the php page, the server executes the PHP command line parameters and sends the execution results To the user's browser, similar to ASP and CoildFusion, PHP can run on WINDOWS and various versions of UNIX. In addition to being able to manipulate your pages, PHP can also send HTTP headers.

You can set cookies, manage digital signatures and redirect users, and it provides excellent connectivity to other databases (also ODBC), integrating various external libraries to parse XML with PDF documents anything. Then did you know that you can use the powerful functions of php to do other things? When running in independent cgi mode, a php executable program is required. It has many PHP command line parameters, some of which can be used for fun purposes. The following are all PHP command line parameters, where [] indicates whether or not None, the <> table is a must. Usage php [-q] [-h] [-s] [-v] [-i] [-f ] | { [args...]} -q Quiet mode. Do not output HTTP headers.

-s Convert PHP program files to HTML in color format (for example, reserved words are in green, functions and variables are in blue, comments are in yellow and strings are in red, etc.

-f reads and interprets the specified file.

-c reads the php.ini file in

-a runs interactively

-d foo[=bar ] Define the value of the input item foo in ini as bar

-e Output additional information for debugging and performance analysis

-z Load the Zend extension file

-i php Related information

-h help itself.

1. Use php -q filename.php to use the php program as a shell program,

2. Use - s Convert your own PHP program to HTML. Isn’t this very worry-free?

3. Use the odbc function of PHP command line parameters to operate the database in the shell command.


http://www.bkjia.com/PHPjc/446189.html

truehttp: //www.bkjia.com/PHPjc/446189.htmlTechArticleIn this article, we will explain in detail about when the user opens the php page, the server will execute PHP Command line parameters and send the execution results to the user's browser, which is similar to...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template