📄 php.1.in
字号:
.TH PHP 1 "2007" "The PHP Group" "Scripting Language".SH NAME.TP 15php - PHP Command Line Interface 'CLI'.SH SYNOPSIS.B php[options] [.B \-f ].IR file[[\-\-] .IR args.\|.\|. ].LP.B php[options] .B \-r .IR code[[\-\-].IR args.\|.\|. ].LP.B php[options] \-\- [.IR args.\|.\|. ].LP.SH DESCRIPTION.B PHPis a widely\-used general\-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This is the command line interfacethat enables you to do the following:.PYou can parse and execute files by using parameter \-f followed by the name of the .IR file to be executed..LPUsing parameter \-r you can directly execute PHP .IR code simply as you would do inside a .php file when using the .B eval() function..LPIf none of \-r or \-f is present but a single parameter is given then this parameter is taken as the filename to parse and execute (same as with \-f). If no parameter is present then the standard input is read and executed..SH OPTIONS.TP 15.B \-aRun interactively.TP.B \-c \fIpath\fP|\fIfile\fPLook for .B php.ini file in the directory.IR pathor use the specified.IR file.TP.B \-nNo .B php.ini file will be used.TP.B \-d \fIfoo\fP[=\fIbar\fP]Define INI entry .IR foo with value.IR bar.TP.B \-eGenerate extended information for debugger/profiler.TP.B \-f \fIfile\fPParse and execute .IR file.TP.B \-hThis help.TP.B \-iPHP information and configuration.TP.B \-lSyntax check only (lint).TP.B \-mShow compiled in modules.TP.B \-r \fIcode\fPRun PHP .IR codewithout using script tags.B '<?..?>'.TP.B \-sDisplay colour syntax highlighted source.TP.B \-vVersion number.TP.B \-wDisplay source with stripped comments and whitespace.TP.B \-z \fIfile\fPLoad Zend extension .IR file.TP.IR args.\|.\|.Arguments passed to script. Use .B '\-\-'.IR argswhen first argument starts with .B '\-'or script is read from stdin.SH FILES.TP 15.B php\-cli.iniThe configuration file for the CLI version of PHP..TP.B php.iniThe standard configuration file will only be used when .B php\-cli.inicannot not be found..SH EXAMPLES.TP 5\fIphp -r 'echo "Hello World\\n";'\fPThis command simply writes the text "Hello World" to standard out..TP\fIphp \-r 'print_r(gd_info());'\fPThis shows the configuration of your gd extension. You can use thisto easily check which imag formats you can use. If you have anydynamic modules you may want to use the same ini file that php useswhen executed from your webserver. There are more extensions whichhave such a function. For dba use:.RS\fIphp \-r 'print_r(dba_handlers(1));'\fP.RE.SH TIPSYou can use a shebang line to automatically invoke phpfrom scripts. Only the CLI version of PHP will ignoresuch a first line as shown below:.P.PD 0.RS#!/bin/php.P<?php.P // your script.P?>.RE.PD 1.P.SH SEE ALSOFor a more or less complete description of PHP look here:.PD 0.P.B http://www.php.net/manual/.PD 1.PA nice introduction to PHP by Stig Bakken can be found here:.PD 0.P.B http://www.zend.com/zend/art/intro.php.PD 1.SH BUGSYou can view the list of known bugs or report any new bug youfound here:.PD 0.P.B http://bugs.php.net.PD 1.SH AUTHORSThe PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski..PAdditional work for the CLI sapi was done by Edin Kadribasic and Marcus Boerger..PA List of active developers can be found here:.PD 0.P.B http://www.php.net/credits.php.PD 1.PAnd last but not least PHP was developed with the help of a huge amount of contributors all around the world..SH VERSION INFORMATIONThis manpage describes \fBphp\fP, version @PHP_VERSION@..SH COPYRIGHTCopyright \(co 1997\-2007 The PHP Group.LPThis source file is subject to version 3.01 of the PHP license,that is bundled with this package in the file LICENSE, and isavailable through the world-wide-web at the following url:.PD 0.P.B http://www.php.net/license/3_01.txt.PD 1.PIf you did not receive a copy of the PHP license and are unable toobtain it through the world-wide-web, please send a note to.B license@php.net so we can mail you a copy immediately.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -