|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-03-05 12:05 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 11 16:00:02 2026 UTC |
The EscapeShellCmd is not useful. What are you supposed to do with it? It's pointless. You should instead have a new function, EscapeShellArg, which does the following: function EscapeShellArg($cmd) { return "'".ereg_replace("'", "'\\''", $cmd)."'"; } this way you actually *can* run shell processes safely, e.g.: exec('/bin/foo arg1 arg2 '.EscapeShellArg($cgivar));