老早之前就发现REQUEST_FILENAME不准的问题,当时对中文文档深信不疑。 中文文档
REQUEST_FILENAME
这是与请求相匹配的完整的本地文件系统的文件路径名。
英文文档
REQUEST_FILENAME
The full local filesystem path to the file or script matching the request, if this has already been determined by the server at the time REQUEST_FILENAME is referenced. Otherwise, such as when used in virtual host context, the same value as REQUEST_URI.
看完e文文档就明了了,原来REQUEST_FILENAME在虚拟主机配置上下文里是跟REQUEST_URI一样的。。