clean Blog
  • 首页
  • PHP
  • Linux
  • MySQL
  • 笔记
  • 其它
  • 关于
  • 联系我
首页

php basename()无法正确获取带中文字符的文件名

tuine 11 October 20181 Comments

查看文档:

Note:

basename() is locale aware, so for it to see the correct basename with multibyte character paths, the matching locale must be set using the setlocale() function.


basename()函数依赖于区域,我们只需设置区域:

1
 setlocale(LC_ALL, 'zh_CN.UTF8');


Share on


1 Comments

Sanstone

Sanstone

17 October 2018 - 回复
好棒棒

Add Comment

热门文章

  • Mac OS找不到 /usr/include文件夹的解决办法
  • 错误openssl_sign(): supplied key param cannot be coerced into a private key
  • m3u8简单教程之
  • m3u8简单教程之西虹市首富下载
  • nginx针对url参数重写URI
  • ueditor使用需修复的一些问题

相关文章

  • 错误openssl_sign(): supplied key param cannot be coerced into a private key
  • strpos第二个参数为数字时
  • 解决PHP报错No input file specified
  • parse_ini_file() 函数及问题
  • php 小数精度问题
  • PHP CURL ERROR 77

Tags

  • 下载
  • phpexcel
  • mac /usr/include
  • curl77
  • setlocale
  • basename
  • m3u8
  • 西虹市首富
  • parse_ini_file
  • asdf
  • ueditor
  • 123
  • rewrite
  • nginx
  • 头痛
  • php
  • crontab
  • reset
  • linux
  • centos
  • git
  • 软连接
  • rm
  • strpos
  • rsa
  • ssl
  • mysql
  • 文章
  • 字符串

关于我

Everything is possible.

让我们站起来干

近期文章

  • PHPExcel出现 Formula Error的解决方案
  • Mac OS找不到 /usr/include文件夹的解决办法
  • PHP CURL ERROR 77
  • php basename()无法正确获取带中文字符的文件名
  • MYSQL5.7版本 排序后groupby无效
  • mysql日常操作及错误解决

联系我

邮箱:admin@tuine.me

留言给我:点我

Copyright 2025 tuine.me - 豫ICP备17002316号