Try to put a better example of EscapeShellCmd usage

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32024 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Stanislav Malyshev 2000-09-05 17:35:42 +00:00
parent 1ecd806046
commit 347b31d4d9

View file

@ -65,7 +65,10 @@ system("ls ".EscapeShellArg($dir))
<para>
<informalexample>
<programlisting role="php">
system(EscapeShellCmd($cmd))
$e = EscapeShellCmd($userinput);
system("echo $e"); // here we don't care if $e has spaces
$f = EscapeShellCmd($filename);
system("touch \"/tmp/$f\"; ls -l \"/tmp/$f\""); // and here we do, so we use quotes
</programlisting>
</informalexample>
</para>