mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
1ecd806046
commit
347b31d4d9
1 changed files with 4 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue