note 111919 added to function.escapeshellarg
| From: | wijnand at jpresult dot nl | Date: | Thu, 11 Apr 2013 11:32:41 +0000 |
| Subject: | note 111919 added to function.escapeshellarg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194452@lists.php.net to get a copy of this message | ||
Here's a quick and dirty replacement of this function in case you need to deal with special
characters.
<?php
/**
* An ugly, non-ASCII-character safe replacement of escapeshellarg().
*/
function escapeshellarg_special($file) {
return "'" . str_replace("'",
"'\"'\"'", $file) . "'";
}
?>
----
Server IP: 69.147.83.199
Probable Submitter: 90.145.68.30
----
Manual Page -- http://php.net/manual/en/function.escapeshellarg.php
Edit -- https://master.php.net/note/edit/111919
Del: integrated -- https://master.php.net/note/delete/111919/integrated
Del: useless -- https://master.php.net/note/delete/111919/useless
Del: bad code -- https://master.php.net/note/delete/111919/bad+code
Del: spam -- https://master.php.net/note/delete/111919/spam
Del: non-english -- https://master.php.net/note/delete/111919/non-english
Del: in docs -- https://master.php.net/note/delete/111919/in+docs
Del: other reasons-- https://master.php.net/note/delete/111919
Reject -- https://master.php.net/note/reject/111919
Search -- https://master.php.net/manage/user-notes.php