ID: 22423 Updated by: [EMAIL PROTECTED] Reported By: sbriesen at gmx dot de -Status: Open +Status: Closed Bug Type: *URL Functions Operating System: SuSE 8.1 PHP Version: 4.3.1 New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-02-25 16:40:07] sbriesen at gmx dot de $x=parse_url('file:///any/path/file.ext'); gives you: Array ( [scheme] => file [host] => /any/path/file.ext ) $x=parse_url('file://localhost/any/path/file.ext'); gives you: Array ( [scheme] => file [host] => localhost [path] => /any/path/file.ext ) the first one is definitively parsed wrong!!! in a file:// url, the 'host' is optional and is located between :// and the first slash. scheme://[[user[:[EMAIL PROTECTED]/path so $x=parse_url('file:///any/path/file.ext'); *should* give you: Array ( [scheme] => file [path] => /any/path/file.ext ) and nothing else! btw: have you ever seen a 'host' with slashes? ;-) btw^2: a 'join_url' (or similar) should be also available (as the counterpart to 'parse_url'). Yes, I know, I can write such function for myself in plain PHP. But there should be always the opposite counterpart available as a native PHP function! btw^3: not all file-functions are capable to handle file:// urls correctly. I know, that is not your problem... ;-) I will try to find all that functions and create a seperate bugreport. regards, Stefan ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22423&edit=1
