[PHP-DEV] Bug #841 Updated: basename() & dirname() do not parse path correctly From: Bug Database (php-dev <email protected>)
Date: 12/21/98

ID: 841
Updated by: shane
Reported By: inlan <email protected>
Status: Open
Bug Type: Misbehaving function
Assigned To:
Comments:

The correct operations of these functions should be...

dirname returns everything PRIOR to the last / or \ in the path.
basename returns everything AFTER the last / or \ in the path.

Reason for this is that we do not stat the file to check if it exists. There are uses for these functions even in the case the directory or file is no there. Therefor, we have no way to know if in some instances,
such as 'something' or '/something', it is a directory or file being refered to, even if there is a dot in the string, directories can also have dots. So it is a matter of best guess.

Any other developers have comments?

Full Bug description available at: http://ca.php.net/bugs.php3?id=841

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>