Apache htdocs in folder with unicode name

时光毁灭记忆、已成空白 提交于 2019-12-07 04:51:15

问题


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?


回答1:


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.




回答2:


i have same problem,
Read more @ http://www.oneminuteinfo.com/2011/02/solve-php-failed-to-open-stream-error.html it may be help you



来源:https://stackoverflow.com/questions/2856270/apache-htdocs-in-folder-with-unicode-name

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