cvs: /phpdoc/functions exec.sgml

From: Date: Mon, 15 Nov 1999 11:02:07 +0000
Subject: cvs: /phpdoc/functions exec.sgml
Groups: php.dev 
Request: Send a blank email to php-dev+get-12563@lists.php.net to get a copy of this message
cslawi Mon Nov 15 06:02:07 1999 EDT Modified files: /phpdoc/functions exec.sgml Log: Documented the system() return values. Index: phpdoc/functions/exec.sgml diff -u phpdoc/functions/exec.sgml:1.4 phpdoc/functions/exec.sgml:1.5 --- phpdoc/functions/exec.sgml:1.4 Mon Nov 15 05:03:16 1999 +++ phpdoc/functions/exec.sgml Mon Nov 15 06:02:06 1999 @@ -83,6 +83,41 @@ </refsect1> </refentry> + <refentry id="function.passthru"> + <refnamediv> + <refname>passthru</refname> + <refpurpose>Execute an external program and display raw output</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>string <function>passthru</function></funcdef> + <paramdef>string <parameter>command</parameter></paramdef> + <paramdef>int <parameter><optional>return_var</optional></parameter></paramdef> + </funcsynopsis> + <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 + 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 + browser. A common use for this is to execute something like the + pbmplus utilities that can output an image stream directly. By + setting the content-type to <emphasis>image/gif</emphasis> and + then calling a pbmplus program to output a gif, you can create + PHP scripts that output images directly.</para> + <para> + See also <function>exec</function>, + <function>PassThru</function>, <function>popen</function>, + <function>EscapeShellCmd</function>, and the <link + linkend="language.operators.execution">backtick operator</link>. + </para> + </refsect1> + </refentry> + <refentry id="function.system"> <refnamediv> <refname>system</refname> @@ -107,46 +142,14 @@ <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> - <para> - See also <function>exec</function>, - <function>PassThru</function>, <function>popen</function>, - <function>EscapeShellCmd</function>, and the <link - linkend="language.operators.execution">backtick operator</link>. - </para> - </refsect1> - </refentry> - - <refentry id="function.passthru"> - <refnamediv> - <refname>passthru</refname> - <refpurpose>Execute an external program and display raw output</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>string <function>passthru</function></funcdef> - <paramdef>string <parameter>command</parameter></paramdef> - <paramdef>int <parameter><optional>return_var</optional></parameter></paramdef> - </funcsynopsis> - <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 - 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 - browser. A common use for this is to execute something like the - pbmplus utilities that can output an image stream directly. By - setting the content-type to <emphasis>image/gif</emphasis> and - then calling a pbmplus program to output a gif, you can create - PHP scripts that output images directly.</para> <para> See also <function>exec</function>, <function>PassThru</function>, <function>popen</function>,

« previous php.dev (#12563) next »