philip Fri Apr 8 19:18:40 2005 EDT
Modified files: /phpdoc/en/reference/exec/functions escapeshellarg.xml escapeshellcmd.xml exec.xml passthru.xml proc-close.xml proc-get-status.xml proc-nice.xml proc-terminate.xml shell-exec.xml system.xml Log: Moved to new doc style
http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/escapeshellarg.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/exec/functions/escapeshellarg.xml diff -u phpdoc/en/reference/exec/functions/escapeshellarg.xml:1.8 phpdoc/en/reference/exec/functions/escapeshellarg.xml:1.9 --- phpdoc/en/reference/exec/functions/escapeshellarg.xml:1.8 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/escapeshellarg.xml Fri Apr 8 19:18:40 2005 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.8 --> <refentry id="function.escapeshellarg"> <refnamediv> <refname>escapeshellarg</refname> <refpurpose>Escape a string to be used as a shell argument</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>escapeshellarg</methodname> @@ -20,9 +21,37 @@ arguments to shell functions coming from user input. The shell functions include <function>exec</function>, <function>system</function> and the <link linkend="language.operators.execution">backtick operator</link>. - A standard use would be:</para> + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>arg</parameter></term> + <listitem> + <para> + The argument that will be escaped. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <informalexample> + The escaped string. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>escapeshellarg</function> example</title> <programlisting role="php"> <![CDATA[ <?php @@ -30,12 +59,20 @@ ?> ]]> </programlisting> - </informalexample> + </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>escapeshellcmd</function>, <function>exec</function>, - <function>popen</function>, <function>system</function>, and the <link - linkend="language.operators.execution">backtick operator</link>. + <simplelist> + <member><function>escapeshellcmd</function></member> + <member><function>exec</function></member> + <member><function>popen</function></member> + <member><function>system</function></member> + <member><link linkend="language.operators.execution">backtick operator</link></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/escapeshellcmd.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/exec/functions/escapeshellcmd.xml diff -u phpdoc/en/reference/exec/functions/escapeshellcmd.xml:1.6 phpdoc/en/reference/exec/functions/escapeshellcmd.xml:1.7 --- phpdoc/en/reference/exec/functions/escapeshellcmd.xml:1.6 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/escapeshellcmd.xml Fri Apr 8 19:18:40 2005 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> <refentry id="function.escapeshellcmd"> <refnamediv> <refname>escapeshellcmd</refname> <refpurpose>Escape shell metacharacters</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>escapeshellcmd</methodname> @@ -20,9 +21,38 @@ is passed to the <function>exec</function> or <function>system</function> functions, or to the <link linkend="language.operators.execution">backtick - operator</link>. A standard use would be:</para> + operator</link>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>command</parameter></term> + <listitem> + <para> + The command that will be escaped. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <informalexample> + The escaped string. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>escapeshellcmd</function> example</title> <programlisting role="php"> <![CDATA[ <?php @@ -37,12 +67,20 @@ ?> ]]> </programlisting> - </informalexample> + </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>escapeshellarg</function>, <function>exec</function>, - <function>popen</function>, <function>system</function>, and the <link - linkend="language.operators.execution">backtick operator</link>. + <simplelist> + <member><function>escapeshellarg</function></member> + <member><function>exec</function></member> + <member><function>popen</function></member> + <member><function>system</function></member> + <member><link linkend="language.operators.execution">backtick operator</link></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/exec.xml?r1=1.16&r2=1.17&ty=u Index: phpdoc/en/reference/exec/functions/exec.xml diff -u phpdoc/en/reference/exec/functions/exec.xml:1.16 phpdoc/en/reference/exec/functions/exec.xml:1.17 --- phpdoc/en/reference/exec/functions/exec.xml:1.16 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/exec.xml Fri Apr 8 19:18:40 2005 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> <refentry id="function.exec"> <refnamediv> <refname>exec</refname> <refpurpose>Execute an external program</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>exec</methodname> @@ -16,29 +17,68 @@ </methodsynopsis> <para> <function>exec</function> executes the given - <parameter>command</parameter>, however it does not output - anything. It simply returns the last line from the result of the - command. If you need to execute a command and have all the data - from the command passed directly back without any interference, - use the <function>passthru</function> function. - </para> - <para> - If the <parameter>output</parameter> argument is present, then the - specified array will be filled with every line of output from the - command. Line endings, such as <literal>\n</literal>, are not - included in this array. Note that if the array already contains some - elements, <function>exec</function> will append to the end of the array. - If you do not want the function to append elements, call - <function>unset</function> on the array before passing it to - <function>exec</function>. - </para> - <para> - If the <parameter>return_var</parameter> argument is present - along with the <parameter>output</parameter> argument, then the - return status of the executed command will be written to this - variable. + <parameter>command</parameter>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>command</parameter></term> + <listitem> + <para> + The command that will be executed. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>output</parameter></term> + <listitem> + <para> + If the <parameter>output</parameter> argument is present, then the + specified array will be filled with every line of output from the + command. Line endings, such as <literal>\n</literal>, are not + included in this array. Note that if the array already contains some + elements, <function>exec</function> will append to the end of the array. + If you do not want the function to append elements, call + <function>unset</function> on the array before passing it to + <function>exec</function>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>return_var</parameter></term> + <listitem> + <para> + If the <parameter>return_var</parameter> argument is present + along with the <parameter>output</parameter> argument, then the + return status of the executed command will be written to this + variable. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The last line from the result of the command. If you need to execute a + command and have all the data from the command passed directly back without + any interference, use the <function>passthru</function> function. </para> <para> + To get the output of the executed command, be sure to set and use the + <parameter>output</parameter> parameter. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title>An <function>exec</function> example</title> <programlisting role="php"> @@ -52,16 +92,27 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; &warn.escapeshell; ¬e.exec-bg; ¬e.exec-path; &warn.sm.exec; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>system</function>, - <function>passthru</function>, <function>popen</function>, - <function>escapeshellcmd</function> - <function>pcntl_exec</function>, and the <link - linkend="language.operators.execution">backtick operator</link>. + <simplelist> + <member><function>system</function></member> + <member><function>passthru</function></member> + <member><function>escapeshellcmd</function></member> + <member><function>pcntl_exec</function></member> + <member><function>system</function></member> + <member><link linkend="language.operators.execution">backtick operator</link></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/passthru.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/exec/functions/passthru.xml diff -u phpdoc/en/reference/exec/functions/passthru.xml:1.8 phpdoc/en/reference/exec/functions/passthru.xml:1.9 --- phpdoc/en/reference/exec/functions/passthru.xml:1.8 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/passthru.xml Fri Apr 8 19:18:40 2005 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> <refentry id="function.passthru"> <refnamediv> <refname>passthru</refname> <refpurpose>Execute an external program and display raw output</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>void</type><methodname>passthru</methodname> @@ -16,9 +17,7 @@ <para> The <function>passthru</function> function is similar to the <function>exec</function> function in that it executes a - <parameter>command</parameter>. If the - <parameter>return_var</parameter> argument is present, the return - status of the Unix command will be placed here. This function + <parameter>command</parameter>. This function should be used in place of <function>exec</function> or <function>system</function> when the output from the Unix command is binary data which needs to be passed directly back to the @@ -28,15 +27,51 @@ then calling a pbmplus program to output a gif, you can create PHP scripts that output images directly. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>command</parameter></term> + <listitem> + <para> + The command that will be executed. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>return_var</parameter></term> + <listitem> + <para> + If the <parameter>return_var</parameter> argument is present, the + return status of the Unix command will be placed here. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; &warn.escapeshell; ¬e.exec-bg; ¬e.exec-path; &warn.sm.exec; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>exec</function>, <function>system</function>, - <function>popen</function>, <function>escapeshellcmd</function>, - and the <link linkend="language.operators.execution">backtick - operator</link>. + <simplelist> + <member><function>exec</function></member> + <member><function>system</function></member> + <member><function>popen</function></member> + <member><function>escapeshellcmd</function></member> + <member><link linkend="language.operators.execution">backtick operator</link></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/proc-close.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/exec/functions/proc-close.xml diff -u phpdoc/en/reference/exec/functions/proc-close.xml:1.7 phpdoc/en/reference/exec/functions/proc-close.xml:1.8 --- phpdoc/en/reference/exec/functions/proc-close.xml:1.7 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/proc-close.xml Fri Apr 8 19:18:40 2005 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.28 --> <refentry id='function.proc-close'> <refnamediv> <refname>proc_close</refname> <refpurpose>Close a process opened by <function>proc_open</function> and return the exit code of that process.</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>int</type><methodname>proc_close</methodname> @@ -23,6 +24,23 @@ while the pipes are open. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>process</parameter></term> + <listitem> + <para> + The <function>proc_open</function> <type>resource</type> that will + be closed. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/proc-get-status.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/exec/functions/proc-get-status.xml diff -u phpdoc/en/reference/exec/functions/proc-get-status.xml:1.7 phpdoc/en/reference/exec/functions/proc-get-status.xml:1.8 --- phpdoc/en/reference/exec/functions/proc-get-status.xml:1.7 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/proc-get-status.xml Fri Apr 8 19:18:40 2005 @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id='function.proc-get-status'> <refnamediv> <refname>proc_get_status</refname> <refpurpose>Get information about a process opened by <function>proc_open</function></refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>array</type><methodname>proc_get_status</methodname> @@ -13,10 +14,34 @@ </methodsynopsis> <para> <function>proc_get_status</function> fetches data about a - process opened using <function>proc_open</function>. The - collected information is returned in an array containing the - following elements: + process opened using <function>proc_open</function>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>process</parameter></term> + <listitem> + <para> + The <function>proc_open</function> <type>resource</type> that will + be evaluated. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + An <type>array</type> of collected information on success, and &false; + on failure. The returned array contains the following elements: </para> + <para> <informaltable> <tgroup cols="3"> <thead> @@ -86,8 +111,15 @@ </tbody> </tgroup> </informaltable> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>proc_open</function>. + <simplelist> + <member><function>proc_open</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/proc-nice.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/exec/functions/proc-nice.xml diff -u phpdoc/en/reference/exec/functions/proc-nice.xml:1.7 phpdoc/en/reference/exec/functions/proc-nice.xml:1.8 --- phpdoc/en/reference/exec/functions/proc-nice.xml:1.7 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/proc-nice.xml Fri Apr 8 19:18:40 2005 @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id='function.proc-nice'> <refnamediv> <refname>proc_nice</refname> <refpurpose>Change the priority of the current process</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>proc_nice</methodname> @@ -16,12 +17,43 @@ process by the amount specified in <parameter>increment</parameter>. A positive <parameter>increment</parameter> will lower the priority of the current process, whereas a negative <parameter>increment</parameter> - will raise the priority. If an error occurs, like the user lacks - permission to change the priority, an error of level - <constant>E_WARNING</constant> is generated and &false; is returned. - Otherwise, &true; is returned. + will raise the priority. + </para> + <para> + <function>proc_nice</function> is not related to + <function>proc_open</function> and its associated functions in any way. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>increment</parameter></term> + <listitem> + <para> + The increment value of the priority change. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + If an error occurs, like the user lacks permission to change the priority, + an error of level <constant>E_WARNING</constant> is also generated. + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> + <title>Availability</title> <para> <function>proc_nice</function> will only exist if your system has 'nice' capabilities. 'nice' conforms to: SVr4, SVID EXT, AT&T, X/OPEN, BSD @@ -29,10 +61,6 @@ on Windows. </para> </note> - <para> - <function>proc_nice</function> is not related to - <function>proc_open</function> and its associated functions in any way. - </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/proc-terminate.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/exec/functions/proc-terminate.xml diff -u phpdoc/en/reference/exec/functions/proc-terminate.xml:1.5 phpdoc/en/reference/exec/functions/proc-terminate.xml:1.6 --- phpdoc/en/reference/exec/functions/proc-terminate.xml:1.5 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/proc-terminate.xml Fri Apr 8 19:18:40 2005 @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id='function.proc-terminate'> <refnamediv> <refname>proc_terminate</refname> <refpurpose>kills a process opened by proc_open</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>int</type><methodname>proc_terminate</methodname> @@ -30,9 +31,16 @@ continue with other tasks. You may poll the process (to see if it has stopped yet) by using the <function>proc_get_status</function> function. </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>proc_open</function>, <function>proc_close</function>, - and <function>proc_get_status</function>. + <simplelist> + <member><function>proc_open</function></member> + <member><function>proc_close</function></member> + <member><function>proc_get_status</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/shell-exec.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/exec/functions/shell-exec.xml diff -u phpdoc/en/reference/exec/functions/shell-exec.xml:1.7 phpdoc/en/reference/exec/functions/shell-exec.xml:1.8 --- phpdoc/en/reference/exec/functions/shell-exec.xml:1.7 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/shell-exec.xml Fri Apr 8 19:18:40 2005 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> <refentry id='function.shell-exec'> <refnamediv> <refname>shell_exec</refname> <refpurpose>Execute command via shell and return the complete output as a string</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>shell_exec</methodname> @@ -16,6 +17,33 @@ This function is identical to the <link linkend="language.operators.execution">backtick operator</link>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>cmd</parameter></term> + <listitem> + <para> + The command that will be executed. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The output from the executed command. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>shell_exec</function> example</title> @@ -29,12 +57,24 @@ </programlisting> </example> </para> + </refsect1> - ¬e.sm.disabled; + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &sm.disabled; + </para> + </note> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>exec</function> and - <function>escapeshellcmd</function>. + <simplelist> + <member><function>exec</function></member> + <member><function>escapeshellcmd</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/exec/functions/system.xml?r1=1.13&r2=1.14&ty=u Index: phpdoc/en/reference/exec/functions/system.xml diff -u phpdoc/en/reference/exec/functions/system.xml:1.13 phpdoc/en/reference/exec/functions/system.xml:1.14 --- phpdoc/en/reference/exec/functions/system.xml:1.13 Fri Apr 8 16:14:52 2005 +++ phpdoc/en/reference/exec/functions/system.xml Fri Apr 8 19:18:40 2005 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.24 --> <refentry id="function.system"> <refnamediv> <refname>system</refname> <refpurpose>Execute an external program and display the output</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>system</methodname> @@ -16,27 +17,56 @@ <para> <function>system</function> is just like the C version of the function in that it executes the given - <parameter>command</parameter> and outputs the result. If a - variable is provided as the second argument, then the return - status code of the executed command will be written to this - variable. + <parameter>command</parameter> and outputs the result. </para> - &warn.escapeshell; - ¬e.exec-bg; <para> The <function>system</function> call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module. </para> <para> - Returns the last line of the command output on success, and &false; - on failure. - </para> - <para> If you need to execute a command and have all the data from the command passed directly back without any interference, use the <function>passthru</function> function. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>command</parameter></term> + <listitem> + <para> + The command that will be executed. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>return_var</parameter></term> + <listitem> + <para> + If the <parameter>return_var</parameter> argument is present, then the + return status of the executed command will be written to this + variable. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the last line of the command output on success, and &false; + on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>system</function> example</title> @@ -60,14 +90,27 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &warn.escapeshell; + ¬e.exec-bg; ¬e.exec-path; &warn.sm.exec; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>exec</function>, - <function>passthru</function>, <function>popen</function>, - <function>escapeshellcmd</function>, - <function>pcntl_exec</function>, and the <link - linkend="language.operators.execution">backtick operator</link>. + <simplelist> + <member><function>exec</function></member> + <member><function>passthru</function></member> + <member><function>popen</function></member> + <member><function>escapeshellcmd</function></member> + <member><function>pcntl_exec</function></member> + <member><link linkend="language.operators.execution">backtick operator</link></member> + </simplelist> </para> </refsect1> </refentry>