note 86972 added to function.basename
| From: | JoelFranusic at osu1 dot php dot net | Date: | Wed, 12 Nov 2008 23:30:14 +0000 |
| Subject: | note 86972 added to function.basename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146463@lists.php.net to get a copy of this message | ||
The results of the basename() function are dependent on your locale setting.
If basename() is returning blank results for strings with multibyte characters, you can try
including the following in your script:
<?php
setlocale(LC_ALL, 'en_US.UTF8'); # or any other locale that can handle multibyte
characters.
?>
However, the best solution to do this would be to change the locale setting on your system or
webserver. For example, on Debian systems, this is done in /etc/init.d/apache
----
Server IP: 208.69.120.35
Probable Submitter: 208.74.177.98
----
Manual Page -- http://www.php.net/manual/en/function.basename.php
Edit -- https://master.php.net/note/edit/86972
Del: integrated -- https://master.php.net/note/delete/86972/integrated
Del: useless -- https://master.php.net/note/delete/86972/useless
Del: bad code -- https://master.php.net/note/delete/86972/bad+code
Del: spam -- https://master.php.net/note/delete/86972/spam
Del: non-english -- https://master.php.net/note/delete/86972/non-english
Del: in docs -- https://master.php.net/note/delete/86972/in+docs
Del: other reasons-- https://master.php.net/note/delete/86972
Reject -- https://master.php.net/note/reject/86972
Search -- https://master.php.net/manage/user-notes.php