file name with special characters like “é” NOT FOUND

被刻印的时光 ゝ 提交于 2019-12-05 23:14:13

This is tricky. It depends what encoding your filesystem uses for filenames and how (if) your webserver or PHP functions convert the encoding.

First of all, make sure your links never use unencoded non-ASCII characters. URLs should be in UTF-8, i.e. é should be encoded as %C3%A9. If that doesn't work, try %E9 (é in ISO-8859-1).

You might find iconv() function useful to convert encodings. rawurlencode() is obligatory.

do you see them if you run this?

foreach (new DirectoryIterator('/path/to/folder') as $fileInfo) {
    if($fileInfo->isDot() || $fileInfo->isDir()) continue;
    echo $fileInfo->getFilename() . "<br>\n";
}

EDIT: just realised i misread the question. Its likely some kind of encoding issue like porneL says

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!