Re: parse_url bug/feature?
| From: | Hartmut Holzgraefe | Date: | Thu, 19 Sep 2002 08:15:22 +0000 |
| Subject: | Re: parse_url bug/feature? | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969348745@lists.php.net to get a copy of this message | ||
Steven Larsen wrote:
"This function returns an associative array returning *any* of the various components of the URL *that are present* *Partial urls are also accepted*, parse_url() *tries its best to parse them correctly*"You are assuming that URLs are HTTP Resources by default, and that every URL type is following a scheme://host/path pattern, which is not the case you are right that the quoted sentence is missleading under that assumption, because parse_url defaults to the more 'natural' assumption that something that doesn't start with a scheme and looks like a valid filename or filesystem path is of scheme 'file:' -- Six Offene Systeme GmbH http://www.six.de/ i.A. Hartmut Holzgraefe Email: hartmut@six.de Tel.: +49-711-99091-77