note 82330 deleted from function.basename by danbrown
| From: | danbrown@php.net | Date: | Wed, 31 Dec 2008 18:52:24 +0000 |
| Subject: | note 82330 deleted from function.basename by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148720@lists.php.net to get a copy of this message | ||
Note Submitter: sven_pauli at mx dot de
----
The UTF-8 work around by roth at egotec dot com contains a little bug.
As he proposed to use
<?php ltrim(basename(' '+$s)) ?>
filenames that actually begin with spaces will be trimmed, which is not what we wanted to have.
This one will do the job:
<?php substr(basename(' ' + $s), 1) ?>