Why does PHP built-in web server not serve file called é.txt (on Windows)

半世苍凉 提交于 2020-01-02 16:29:39

问题


I'm on Windows 7

If I have a directory containing my file é.txt and I start the built-in web server in that directory

php -S localhost:8000

then, using my web browser, I request the URL

http://localhost:8000/é.txt

the web server responds

Not Found

The requested resource /%C3%A9.txt was not found on this server.

回答1:


PHP's Windows filesystem support is broken - it does not properly translate to the native encoding.

See How do I use filesystem functions in PHP, using UTF-8 strings?



来源:https://stackoverflow.com/questions/33150112/why-does-php-built-in-web-server-not-serve-file-called-%c3%a9-txt-on-windows

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