note 73903 added to function.parse-url
| From: | alreece45 at yahoo dot com | Date: | Wed, 14 Mar 2007 22:46:23 +0000 |
| Subject: | note 73903 added to function.parse-url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124463@lists.php.net to get a copy of this message | ||
This function replaces new lines and tabs (at least with the path) with a '_' character.
So something like:
<?php
$url = "http://nowhere.com//t
";
$data = parse_url($url);
echo $data['path'];
?>
will output:
'/__'
This is useful if you're reading URLs from a file as you would want to make sure that the
newline character is not passed to the function.
----
Server IP: 216.194.113.175
Probable Submitter: 69.1.45.213
----
Manual Page -- http://www.php.net/manual/en/function.parse-url.php
Edit -- https://master.php.net/note/edit/73903
Del: integrated -- https://master.php.net/note/delete/73903/integrated
Del: useless -- https://master.php.net/note/delete/73903/useless
Del: bad code -- https://master.php.net/note/delete/73903/bad+code
Del: spam -- https://master.php.net/note/delete/73903/spam
Del: non-english -- https://master.php.net/note/delete/73903/non-english
Del: in docs -- https://master.php.net/note/delete/73903/in+docs
Del: other reasons-- https://master.php.net/note/delete/73903
Reject -- https://master.php.net/note/reject/73903
Search -- https://master.php.net/manage/user-notes.php