note 39038 added to function.parse-url

From: Date: Thu, 15 Jan 2004 09:07:19 +0000
Subject: note 39038 added to function.parse-url
Groups: php.notes 
Request: Send a blank email to php-notes+get-63591@lists.php.net to get a copy of this message
Trying to parse the anchor is actually pretty useless in practice: <?php parse_url("http://www.example.org/path?arg=value#anchor"); ?> Generally, the browser does not present the anchor part of the URI to the server, so... a link to http://www.example.org/path?arg=value#anchor will only bee seen by PHP as http://www.example.org/path?arg=value the '#anchor' is usually kept by the browser (as it is not part of the URI, as far as the server is concerned) So, while() you may find some browser out there that actually DOES submit this part of the URI to the server (doubtful, as it could cause 404 errors and the like), it's certainly not common place, and should not be relied upon ---- Manual Page -- http://www.php.net/manual/en/function.parse-url.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39038 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39038&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39038&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63591) next »