note 10542 added to escapeshellcmd

From: Date: Tue, 09 Jan 2001 21:35:05 +0000
Subject: note 10542 added to escapeshellcmd
Groups: php.notes 
Request: Send a blank email to php-notes+get-9526@lists.php.net to get a copy of this message
Pay heed the previous comment. EscapeShellCmd does not work as you probably expect. EscapeShellArg was added in 4.0.3 and does what you want. The php3 version above is equivalent. EscapeShellCmd does not properly preserve whitespace and quotes in your arguments. A suggestion for the implementers: int execve($path, $args, $environment, $inputs, &$outputs); Should return the result code from the program. $path is a string. $environment: hash $inputs (optional): enumerated array of strings to provide on each filedescriptor to the binary. &$outputs (optional): an enumerated array of the contents of the filedescriptors the program can write on. Thus, you get stdout on $outputs[1] and stderr on $outputs[2]. http://www.php.net/manual/function.escapeshellcmd.php

« previous php.notes (#9526) next »