note 124841 added to function.pathinfo
| From: | TanShun@php.net | Date: | Sun, 22 Mar 2020 13:48:33 +0000 |
| Subject: | note 124841 added to function.pathinfo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214358@lists.php.net to get a copy of this message | ||
If dirname contains multibyte characters, phpinfo() can't parse correctly, eg:
<?php
var_dump(pathinfo('D:\\pictures\\ä½ å¥½\\ä¸ç.jpg'));
?>
The result is:
array(4) {
'dirname' =>
string(11) "D:\pictures"
'basename' =>
string(10) "ä¸ç.jpg"
'extension' =>
string(3) "jpg"
'filename' =>
string(6) "ä¸ç"
}
The dirname is not "D:\pictures\ä½ å¥½", The multibyte characters were stripped
away.
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.195 (proxied: 36.155.117.2)
----
Manual Page -- http://php.net/manual/en/function.pathinfo.php
Edit -- https://master.php.net/note/edit/124841
Del: integrated -- https://master.php.net/note/delete/124841/integrated
Del: useless -- https://master.php.net/note/delete/124841/useless
Del: bad code -- https://master.php.net/note/delete/124841/bad+code
Del: spam -- https://master.php.net/note/delete/124841/spam
Del: non-english -- https://master.php.net/note/delete/124841/non-english
Del: in docs -- https://master.php.net/note/delete/124841/in+docs
Del: other reasons-- https://master.php.net/note/delete/124841
Reject -- https://master.php.net/note/reject/124841
Search -- https://master.php.net/manage/user-notes.php