note 88129 added to function.escapeshellarg
| From: | ArunaLakmal at osu1 dot php dot net | Date: | Mon, 12 Jan 2009 11:11:56 +0000 |
| Subject: | note 88129 added to function.escapeshellarg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149084@lists.php.net to get a copy of this message | ||
I want to execute a php script in command line. I'm passing three arguments to the php script.
Arguments contains strings with new lines(\n), carrage returns(\r). But when i parsing arguments
through the escapeshellarg script don't get the whole argument list.
arguments:
$args =" Dear friend,\nabcd'\nefg, - \n[Solution by Aruna]";
command:
exec ( "php myscript.php escapeshellarg ($msg), &$out );
print_r($out );
Output:
[0] =>
[1] => Array
[2] => (
[3] => [0] => Dear friend,abcd'
[4] => )
As you can see after new line some contents missing in the arguments to the myscript.php file.
Any ideas?
----
Server IP: 69.147.83.197
Probable Submitter: 124.43.49.243
----
Manual Page -- http://www.php.net/manual/en/function.escapeshellarg.php
Edit -- https://master.php.net/note/edit/88129
Del: integrated -- https://master.php.net/note/delete/88129/integrated
Del: useless -- https://master.php.net/note/delete/88129/useless
Del: bad code -- https://master.php.net/note/delete/88129/bad+code
Del: spam -- https://master.php.net/note/delete/88129/spam
Del: non-english -- https://master.php.net/note/delete/88129/non-english
Del: in docs -- https://master.php.net/note/delete/88129/in+docs
Del: other reasons-- https://master.php.net/note/delete/88129
Reject -- https://master.php.net/note/reject/88129
Search -- https://master.php.net/manage/user-notes.php