Pathinfo cannot read Chinese-php Tutorial

Source: Internet
Author: User
Pathinfo cannot read Chinese. PHPcode $ pathinfopathinfo ($ file_name); $ file_basename $ pathinfo [& quot; basename & quot;]; it can only be read if the file name is Chinese. + The extension is normal in English. The space is abroad. In addition, I have configured php. inidefault_charset & quot; UTF-8 & quo pathinfo to read Chinese characters.
PHP code
  $ Pathinfo = pathinfo ($ file_name); $ file_basename = $ pathinfo ["basename"];


If the file name is in Chinese, only the. + extension can be read.

The space is abroad.

In addition, I configured php. ini
Default_charset = "UTF-8"

------ Solution --------------------
Check whether the php file encoding is UTF-8. this option is available at the bottom of the Save As dialog box in Notepad.
In addition, the file name must be in english :)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.