note 112666 added to function.http-build-url

From: Date: Wed, 10 Jul 2013 18:10:36 +0000
Subject: note 112666 added to function.http-build-url
Groups: php.notes 
Request: Send a blank email to php-notes+get-195561@lists.php.net to get a copy of this message
So you used parse_url(...) and looking to put it back together and seeing if this function will do? You may have seen some glue* functions that will rebuild the url with the parts that you have. Try this: <?php $parts = parse_url($uri); /* do your magic here on $parts */ $uri = http_build_url('', $parts); ?> Notice the first param is empty string. It also works with NULL and array() as well. ---- Server IP: 69.147.83.199 Probable Submitter: 207.7.104.10 ---- Manual Page -- http://php.net/manual/en/function.http-build-url.php Edit -- https://master.php.net/note/edit/112666 Del: integrated -- https://master.php.net/note/delete/112666/integrated Del: useless -- https://master.php.net/note/delete/112666/useless Del: bad code -- https://master.php.net/note/delete/112666/bad+code Del: spam -- https://master.php.net/note/delete/112666/spam Del: non-english -- https://master.php.net/note/delete/112666/non-english Del: in docs -- https://master.php.net/note/delete/112666/in+docs Del: other reasons-- https://master.php.net/note/delete/112666 Reject -- https://master.php.net/note/reject/112666 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195561) next »