note 86693 rejected from function.basename by thiago

From: Date: Thu, 30 Oct 2008 03:16:20 +0000
Subject: note 86693 rejected from function.basename by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-145960@lists.php.net to get a copy of this message
Note Submitter: yarco dot w at gmail dot com ---- It seems there are some bugs in basename when dealing with Chinese. It is very strange when cli and mod_php show different results. =============== [yarco@localhost ~]$ php -v PHP 5.2.4 (cli) (built: Oct 16 2007 09:13:35) [yarco@localhost Public]$ php -r 'print basename("/我的音乐/音乐.mp3");' 音乐.mp3 =============== The result is right. But mod_php would cut all of it. =============== [yarco@localhost Public]$ cat <<EOF > 1.php > <?php > print basename("/我的音乐/音乐.mp3"); > ?> > EOF [yarco@localhost Public]$ curl http://localhost/~yarco/1.php .mp3 ===============

« previous php.notes (#145960) next »