cece Sat Aug 16 10:29:14 2003 EDT Modified files: /phpdoc/en/reference/exec/functions system.xml Log: -1 to exampleless docpages ;-) Index: phpdoc/en/reference/exec/functions/system.xml diff -u phpdoc/en/reference/exec/functions/system.xml:1.2 phpdoc/en/reference/exec/functions/system.xml:1.3 --- phpdoc/en/reference/exec/functions/system.xml:1.2 Wed Apr 17 02:37:48 2002 +++ phpdoc/en/reference/exec/functions/system.xml Sat Aug 16 10:29:14 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/exec.xml, last change in rev 1.24 --> <refentry id="function.system"> <refnamediv> @@ -51,6 +51,29 @@ 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> + <example> + <title><function>system</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +echo '<pre>'; + +// Outputs all the result of shellcommand "ls", and returns +// the last output line into $last_line. Stores the return value +// of the shell command in $retval. +$last_line = system('ls', $retval); + +// Printing additional info +echo ' +</pre> +<hr>Last line of the output: '.$last_line.' +<hr>Return value: '.$retval; +?> +]]> + </programlisting> + </example> </para> <para> See also <function>exec</function>,
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php