为什么PHP内置Web服务器不提供名为é.txt的文件(在Windows上) [英] Why does PHP built-in web server not serve file called é.txt (on Windows)

查看:140
本文介绍了为什么PHP内置Web服务器不提供名为é.txt的文件(在Windows上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7上

I'm on Windows 7

如果我有一个包含文件é.txt的目录,并且在该目录中启动了内置Web服务器

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

php -S localhost:8000

然后,使用我的网络浏览器,请求URL

then, using my web browser, I request the URL

http://localhost:8000/é.txt

Web服务器响应

Not Found

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

推荐答案

PHP的Windows文件系统支持已损坏-无法正确转换为本机编码.

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

请参见如何使用使用UTF-8字符串在PHP中使用文件系统功能?

这篇关于为什么PHP内置Web服务器不提供名为é.txt的文件(在Windows上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆