Apache htdocs in folder with unicode name

2019-05-01 04:25发布

I have my apache (for windows) htdocs in a folder like c:\anything1\怘怙怚怛\anything2. The problem is that in this case php won't execute any scripts from here and will display an error message like this:

`Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required 'c:/anything1/怘怙怚怛/anything2/index.php' (include_path='.;C:\php5\pear') in Unknown on line 0 `

If I try to open a html file, it is served by apache, so it seems that the problem appears only with php. Do you have an idea how to solve this?

2条回答
对你真心纯属浪费
2楼-- · 2019-05-01 04:58
贪生不怕死
3楼-- · 2019-05-01 05:09

I may be wrong but I'd say you can't do it without patching PHP. Apache (or the PHP apache handler) passes PHP a path encoded in UTF-8 and PHP ultimately relies on the ANSI version of FindFirstFile (and you cannot set a UTF-8 codepage).

I suggest you submit a bug report.

查看更多
登录 后发表回答