note 8324 deleted from function.escapeshellcmd by didou

From: Date: Sun, 18 May 2003 04:46:48 +0000
Subject: note 8324 deleted from function.escapeshellcmd by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48429@lists.php.net to get a copy of this message
Note Submitter: jon+php-dev@unequivocal.co.uk ---- Be VERY CAREFUL using this function. It is dangerous. The example given is incorrect. I recommend using the following function instead: function EscapeShellArg($x) { return "'".ereg_replace("'", "'\\''", $x)."'"; } This can be safely used as follows: exec('my-program '.EscapeShellArg($arg));

« previous php.notes (#48429) next »