Home  >  Article  >  Backend Development  >  急glob函数本地window下没事,上传到linux下出有关问题

急glob函数本地window下没事,上传到linux下出有关问题

WBOY
WBOYOriginal
2016-06-13 10:05:50987browse

急!glob函数本地window下没事,上传到linux下出问题
如题,我的程序使用utf-8编码,允许用户注册中文用户名并生成此中文命名的文件,如:
member/162100.php
member/涓?鏃犳墍.php //utf-8编码文件,实际中文名是“一无所.php“。

问题是,用$arr=glob('member/*.php')编历member时,

window本地测没事,上传到空间linux下只返回member/162100.php,为什么。请指点。

------解决方案--------------------
估计和系统没关系,是你的php配置的问题,用phpinfo查查
------解决方案--------------------
用dir对象试试看返回什么..

$d = dir("/etc/php5");
echo "Handle: " . $d->handle . "\n";
echo "Path: " . $d->path . "\n";
while (false !== ($entry = $d->read())) {
echo $entry."\n";
}
$d->close();
?>
------解决方案--------------------
还是建个关系表吧,我已经放弃在windows以外的地方用中文文件名了:)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn