mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Long options added
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146510 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
5b8f31fa2b
commit
f648a1f20f
1 changed files with 64 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.23 $ -->
|
||||
<!-- $Revision: 1.24 $ -->
|
||||
<chapter id="features.commandline">
|
||||
<title>Using PHP from the command line</title>
|
||||
<!-- NEW DOCUMENTATION STARTS -->
|
||||
|
@ -96,11 +96,11 @@
|
|||
</para>
|
||||
<para>
|
||||
CLI is started up in quiet mode by default, though the <literal>-q</literal>
|
||||
switch is kept for compatibility so that you can use older CGI scripts.
|
||||
and <literal>--no-header</literal> switches are kept for compatibility so that you can use older CGI scripts.
|
||||
</para>
|
||||
<para>
|
||||
It does not change the working directory to that of the script.
|
||||
(<literal>-C</literal> switch kept for compatibility)
|
||||
(<literal>-C</literal> and <literal>--no-chdir</literal> switches kept for compatibility)
|
||||
</para>
|
||||
<para>
|
||||
Plain text error messages (no HTML formatting).
|
||||
|
@ -108,12 +108,12 @@
|
|||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
There are certain &php.ini; directives which are overriden by the <literal>CLI
|
||||
There are certain &php.ini; directives which are overridden by the <literal>CLI
|
||||
SAPI</literal> because they do not make sense in shell environments:
|
||||
</para>
|
||||
<para>
|
||||
<table>
|
||||
<title>Overriden &php.ini; directives</title>
|
||||
<title>Overridden &php.ini; directives</title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
|
@ -492,18 +492,21 @@ array(4) {
|
|||
which start with <literal>-</literal> to your script.
|
||||
</para>
|
||||
<para>
|
||||
Long options are available since PHP 4.3.3.
|
||||
<table>
|
||||
<title>Command line options</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Option</entry>
|
||||
<entry>Long Option</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>-s</entry>
|
||||
<entry>--syntax-highlight</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Display colour syntax highlighted source.
|
||||
|
@ -523,8 +526,18 @@ array(4) {
|
|||
</note>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>-s</entry>
|
||||
<entry>--syntax-highlighting</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Alias of <literal>--syntax-highlight</literal>.
|
||||
</para>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>-w</entry>
|
||||
<entry>--strip</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Display source with stripped comments and whitespace.
|
||||
|
@ -539,6 +552,7 @@ array(4) {
|
|||
</row>
|
||||
<row>
|
||||
<entry>-f</entry>
|
||||
<entry>--file</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Parses and executed the given filename to the <literal>-f</literal>
|
||||
|
@ -549,6 +563,7 @@ array(4) {
|
|||
</row>
|
||||
<row>
|
||||
<entry>-v</entry>
|
||||
<entry>--version</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Writes the PHP, PHP SAPI, and Zend version to standard output, e.g.
|
||||
|
@ -564,6 +579,7 @@ Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
|
|||
</row>
|
||||
<row>
|
||||
<entry>-c</entry>
|
||||
<entry>--php-ini</entry>
|
||||
<entry>
|
||||
<para>
|
||||
With this option one can either specify a directory where to look for
|
||||
|
@ -580,19 +596,17 @@ $ php -c /custom/directory/custom-file.ini my_script.php
|
|||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>-a</entry>
|
||||
<entry>-n</entry>
|
||||
<entry>--no-php-ini</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Runs PHP interactively.
|
||||
<!--
|
||||
mfischer, 20020510: Couldn't come up with a decent useful description
|
||||
of the current implementation of the interactive mode.
|
||||
-->
|
||||
Ignore php.ini at all. This switch is available since PHP 4.3.0.
|
||||
</para>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>-d</entry>
|
||||
<entry>--define</entry>
|
||||
<entry>
|
||||
<para>
|
||||
This option allows you to set a custom value for any of the configuration
|
||||
|
@ -630,8 +644,22 @@ string(15) "doesntmakesense"
|
|||
</para>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>-a</entry>
|
||||
<entry>--interactive</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Runs PHP interactively.
|
||||
<!--
|
||||
mfischer, 20020510: Couldn't come up with a decent useful description
|
||||
of the current implementation of the interactive mode.
|
||||
-->
|
||||
</para>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>-e</entry>
|
||||
<entry>--profile-info</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Generate extended information for debugger/profiler.
|
||||
|
@ -644,6 +672,7 @@ string(15) "doesntmakesense"
|
|||
</row>
|
||||
<row>
|
||||
<entry>-z</entry>
|
||||
<entry>--zend-extension</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Load Zend extension. If only a filename is given, PHP tries to load
|
||||
|
@ -658,10 +687,11 @@ string(15) "doesntmakesense"
|
|||
</row>
|
||||
<row>
|
||||
<entry>-l</entry>
|
||||
<entry>--syntax-check</entry>
|
||||
<entry>
|
||||
<para>
|
||||
This option provides a convenient way to only perform a syntax check
|
||||
on the given <literal>PHP</literal> code. On succes, the text
|
||||
on the given <literal>PHP</literal> code. On success, the text
|
||||
<literal>No syntax errors detected in <filename></literal> is
|
||||
written to standard output and the shell return code is
|
||||
<literal>0</literal>. On failure, the text <literal>Errors parsing
|
||||
|
@ -683,6 +713,7 @@ string(15) "doesntmakesense"
|
|||
</row>
|
||||
<row>
|
||||
<entry>-m</entry>
|
||||
<entry>--modules</entry>
|
||||
<entry>
|
||||
<para>
|
||||
Using this option, PHP prints out the built in (and loaded) PHP and
|
||||
|
@ -710,6 +741,7 @@ ctype
|
|||
</row>
|
||||
<row>
|
||||
<entry>-i</entry>
|
||||
<entry>--info</entry>
|
||||
<entry>
|
||||
This command line option calls <function>phpinfo</function>, and prints
|
||||
out the results. If <literal>PHP</literal> is not working correctly, it is
|
||||
|
@ -721,6 +753,7 @@ ctype
|
|||
</row>
|
||||
<row>
|
||||
<entry>-r</entry>
|
||||
<entry>--run</entry>
|
||||
<entry>
|
||||
<para>
|
||||
This option allows execution of <literal>PHP</literal> right from
|
||||
|
@ -791,11 +824,29 @@ array(370) {
|
|||
</row>
|
||||
<row>
|
||||
<entry>-h</entry>
|
||||
<entry>--help</entry>
|
||||
<entry>
|
||||
With this option, you can get information about the actual list of
|
||||
command line options and some one line descriptions about what they do.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>-?</entry>
|
||||
<entry>--usage</entry>
|
||||
<entry>
|
||||
Alias of <literal>--help</literal>.
|
||||
</entry>
|
||||
</row>
|
||||
<!--
|
||||
new, not in PHP 4.3.4, but are in php_cli.c 1.102 or cgi_main.c 1.243
|
||||
-b <address:port>|<port> bindpath Bind Path for external FASTCGI Server mode, only CGI, no Windows
|
||||
-B <begin_code> process-begin Run PHP <begin_code> before processing input lines
|
||||
-R <code> process-code Run PHP <code> for every input line
|
||||
-F <file> process-file Parse and execute <file> for every input line
|
||||
-E <end_code> process-end Run PHP <end_code> after processing all input lines
|
||||
-H hide-args Hide any passed arguments from external tools.
|
||||
-g global Define global variables on command line
|
||||
-->
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
@ -814,7 +865,7 @@ array(370) {
|
|||
<para>
|
||||
Note, that you can always direct the output of the PHP
|
||||
executable to an external file with the > character,
|
||||
so <literal>php -q test.php > test.html</literal> will
|
||||
so <literal>php -q test.php > test.html</literal> will
|
||||
print out the output of <filename>test.php</filename>
|
||||
without HTTP headers to the <filename>test.html</filename>
|
||||
file in the same directory.
|
||||
|
|
Loading…
Reference in a new issue