diff --git a/functions/exec.xml b/functions/exec.xml index 4d16b622d7..858832a20a 100644 --- a/functions/exec.xml +++ b/functions/exec.xml @@ -1,4 +1,4 @@ - + Program Execution functions Program Execution @@ -37,7 +37,7 @@ -system("ls ".EscapeShellArg($dir)) +system("ls ".escapeshellarg($dir)); @@ -75,9 +75,9 @@ system("ls ".EscapeShellArg($dir)) -$e = EscapeShellCmd($userinput); +$e = escapeshellcmd($userinput); system("echo $e"); // here we don't care if $e has spaces -$f = EscapeShellCmd($filename); +$f = escapeshellcmd($filename); system("touch \"/tmp/$f\"; ls -l \"/tmp/$f\""); // and here we do, so we use quotes @@ -117,7 +117,7 @@ system("touch \"/tmp/$f\"; ls -l \"/tmp/$f\""); // and here we do, so we use quo anything. It simply returns the last line from the result of the command. If you need to execute a command and have all the data from the command passed directly back without any interference, - use the PassThru function. + use the passthru function. If the array argument is present, then the @@ -185,7 +185,7 @@ system("touch \"/tmp/$f\"; ls -l \"/tmp/$f\""); // and here we do, so we use quo is binary data which needs to be passed directly back to the browser. A common use for this is to execute something like the pbmplus utilities that can output an image stream directly. By - setting the content-type to image/gif and + setting the Content-type to image/gif and then calling a pbmplus program to output a gif, you can create PHP scripts that output images directly.