Apache的文件夹的htdocs与UNI code名称 [英] Apache htdocs in folder with unicode name
问题描述
我有像C文件夹中的我的Apache(适用于Windows)的htdocs:\\ anything1 \\怘怙怚怛\\ anything2。的问题是,在这种情况下,PHP将不会从这里执行任何脚本和显示这样的错误消息:
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:
`警告:未知:未能打开流:在未知在线0没有这样的文件或目录
`Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
致命错误:未知:失败需要开放'C:/ anything1 /怘怙怚怛/anything2/index.php'(include_path中=; C:\\ PHP5 \\梨')在未知在线0
`
Fatal error: Unknown: Failed opening required 'c:/anything1/怘怙怚怛/anything2/index.php' (include_path='.;C:\php5\pear') in Unknown on line 0 `
如果我尝试打开一个HTML文件,它是Apache提供服务,所以它似乎只出现与PHP的问题。
你有一个想法如何解决这个问题?
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?
推荐答案
我可能是错的,但我说你不能没有打补丁的PHP做。阿帕奇(或PHP的Apache处理)通过PHP连接codeD的路径在UTF-8和PHP最终依赖于用FindFirstFile的ANSI版本(你不能设置UTF-8 codePAGE)。
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).
我建议你提交错误报告。
这篇关于Apache的文件夹的htdocs与UNI code名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!