note 107135 added to function.parse-url

From: Date: Tue, 10 Jan 2012 09:30:50 +0000
Subject: note 107135 added to function.parse-url
Groups: php.notes 
Request: Send a blank email to php-notes+get-185515@lists.php.net to get a copy of this message
They say: "This function doesn't work with relative URLs. " and "... For any other scheme this is invalid." but in the practice is not true. $uri = parse_url( '/search?q=one+var&other=var' ); Now $uri will be: Array ( [path] => /search [query] => q=one+var&other=var ) Use parse_str( $uri['query'] ) and works great. Cheers ! ---- Server IP: 69.147.83.197 Probable Submitter: 85.59.34.145 ---- Manual Page -- http://www.php.net/manual/en/function.parse-url.php Edit -- https://master.php.net/note/edit/107135 Del: integrated -- https://master.php.net/note/delete/107135/integrated Del: useless -- https://master.php.net/note/delete/107135/useless Del: bad code -- https://master.php.net/note/delete/107135/bad+code Del: spam -- https://master.php.net/note/delete/107135/spam Del: non-english -- https://master.php.net/note/delete/107135/non-english Del: in docs -- https://master.php.net/note/delete/107135/in+docs Del: other reasons-- https://master.php.net/note/delete/107135 Reject -- https://master.php.net/note/reject/107135 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185515) next »