Date: 09/18/00
- Next message: Andrew Hill: "RE: [PHP] ODBC"
- Previous message: cmoewes <email protected>: "[PHP] PHP User Group Registry"
- In reply to: Maurizio Firmani: "[PHP] dirname bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Maurizio Firmani wrote:
>
> Using PHP 4.0.1pl2
> I've found a strange behaviour of function dirname:
>
> $fileName = "/dir/";
> print "dirname:".dirname($fileName);
>
> gives:
> dirname:
>
> while if $fileName= "/dir/foo.bar" gives:
> dirname: /dir
>
> while if $fileName="/dir" produces nothing in the output, again:
> dirname:
>
> Strange, uh?
Not really, according to the manual:
"Given a string containing a path to a file, this function will return the name of the directory."
Now, as I understand the above, the string ($filename) has to a path to an actual file/s, so therefore $fileName = "/dir/*"; should do the trick.
-- Marko.-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrew Hill: "RE: [PHP] ODBC"
- Previous message: cmoewes <email protected>: "[PHP] PHP User Group Registry"
- In reply to: Maurizio Firmani: "[PHP] dirname bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

