mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Minor improvements.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@82193 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9979defcef
commit
08cc01ca68
1 changed files with 14 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<chapter id="features.commandline">
|
||||
<title>Using PHP from the command line</title>
|
||||
<!-- NEW DOCUMENTATION STARTS -->
|
||||
|
@ -68,7 +68,9 @@
|
|||
<entry>
|
||||
It is desired that any output coming from
|
||||
<function>print</function>, <function>echo</function> and friends is
|
||||
immidiately written to the output and not cached in any buffer.
|
||||
immidiately written to the output and not cached in any buffer. You
|
||||
still can use <link linkend="ref.outcontrol">output buffering</link>
|
||||
if you want to defer or manipulate standard output.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -131,6 +133,7 @@
|
|||
<![CDATA[
|
||||
$ pwd
|
||||
/tmp
|
||||
|
||||
$ php-cgi -f another_directory/test.php
|
||||
/tmp/another_directory
|
||||
]]>
|
||||
|
@ -144,6 +147,7 @@ $ php-cgi -f another_directory/test.php
|
|||
<![CDATA[
|
||||
$ pwd
|
||||
/tmp
|
||||
|
||||
$ php -f another_directory/test.php
|
||||
/tmp
|
||||
]]>
|
||||
|
@ -273,11 +277,11 @@ $ some_application | some_filter | php | sort -u >final_output.txt
|
|||
As long as the arguments you want to pass to your script do not start with
|
||||
the <literal>-</literal> character, there's nothing special to watch out
|
||||
for. Passing an argument to your script which starts with a
|
||||
<literal>-</literal> will cause trouble because <literal>PHP</literal>
|
||||
thinks it has to handle it. To prevent this use the argument list separator
|
||||
<literal>--</literal>. After the argument has been parsed by
|
||||
<literal>PHP</literal>, every argument following it is passed
|
||||
untoched/unparsed to your script.
|
||||
<literal>-</literal> will cause trouble because <literal>PHP</literal>
|
||||
itself thinks it has to handle it. To prevent this use the argument list
|
||||
separator <literal>--</literal>. After the argument has been parsed by
|
||||
<literal>PHP</literal>, every argument following it is passed
|
||||
untoched/unparsed to your script.
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
|
@ -395,9 +399,9 @@ array(4) {
|
|||
<para>
|
||||
Writes the PHP, PHP SAPI, and Zend version to standard output, e.g.
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<![CDATA[
|
||||
$ php -v
|
||||
PHP 4.3.0-dev (cli)
|
||||
PHP 4.3.0-dev (cli), Copyright (c) 1997-2002 The PHP Group
|
||||
Zend Engine v1.2.1, Copyright (c) 1998-2002 Zend Technologies
|
||||
]]>
|
||||
</screen>
|
||||
|
@ -412,7 +416,7 @@ Zend Engine v1.2.1, Copyright (c) 1998-2002 Zend Technologies
|
|||
&php.ini; or you can specify a custom <literal>INI</literal> file
|
||||
directly (which does not need to be named &php.ini;), e.g.:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<![CDATA[
|
||||
$ php -c /custom/directory/ my_script.php
|
||||
|
||||
$ php -c /custom/directory/custom-file.ini my_script.php
|
||||
|
|
Loading…
Reference in a new issue