From 347b31d4d92cd502a897098eabc2bda4941209b3 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 5 Sep 2000 17:35:42 +0000 Subject: [PATCH] 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 --- functions/exec.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/exec.xml b/functions/exec.xml index 25e62f98f7..fdacb44c29 100644 --- a/functions/exec.xml +++ b/functions/exec.xml @@ -65,7 +65,10 @@ system("ls ".EscapeShellArg($dir)) -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