Added a simple example (could use more, but at least it has one now)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@152214 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sean Coates 2004-02-24 02:22:26 +00:00
parent eb9d2598b3
commit ddb9e18899

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 -->
<refentry id="function.exec">
<refnamediv>
@ -39,6 +39,20 @@
return status of the executed command will be written to this
variable.
</para>
<para>
<example>
<title>An <function>exec</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
echo exec('whoami');
?>
]]>
</programlisting>
</example>
</para>
&warn.escapeshell;
&note.exec-bg;
&note.exec-path;