In Linux, how does one directly execute the php script? Below are some php Command Line parameters.
Usage
Php [-q] [-h] [-s] [-v] [-I] [-f] | {[args...]}
-Q quiet mode, no HTTP header output
-S converts php program files to HTML in color format (for example, the reserved words are green, the functions and variables are blue, the comments are yellow, and the strings are red .)
-F read and interpret the specified file
-C reads the php. ini file in
-A Interactive Operation
-D foo [= bar] defines the input item foo in ini as bar.
-E outputs additional information for debugging and Performance Analysis
-Z: Call Zend extension file
-I php-related information
-H help
Example:
/Usr/local/bin/php/home/script/www.phpernote.com. php
// Directly execute the/home/script/www.phpernote.com. php file
Nohup/usr/local/bin/php/home/script/www.phpernote.com. php>/home/script/result. log
// Run the/home/script/www.phpernote.com. php file without hanging up (in the background) and redirect the output to the/home/script/result. log file.
*/1 ***** root-q/usr/local/bin/php/home/script/www.phpernote.com. php
// Execute the script/home/script/www.phpernote.com. php once every minute.
Note:
(1) If you do not know the directory of the php Execution program, you can directly enter the command where is php to obtain the php.exe directory.
(2) Before executing a command, you need to convert the executed file into an executable script file. Example: chmod + x www.phpernote.com. php
Articles you may be interested in
- How many lines of files can be viewed in linux?
- How to Use xampp to build a php VM
- How to open the PHP file and execute the PHP File
- How to know that the SQL statements executed in the database are slow
- Solve the js and css cache problems on linux servers
- How to run php files in the command line in windows
- Jquery waits for the ajax execution to complete and then continues to execute the following code.
- Jquery achieves the effect of table row-changing