【发布时间】:2013-02-02 19:07:00
【问题描述】:
假设用户访问地址 domain.com/test.php
如果文件 test.php 不存在,是否有可能包含位于服务器其他位置的其他文件?
如果我的 webroot 位于 /home/user/www/,我会这样想:
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
INCLUDE: /VAR/OTHERDIR/test.php
编辑:/VAR/OTHERDIR/ 是本地路径
如果文件在另一个文件夹中不存在,则首先抛出 E:404。
不胜感激。
【问题讨论】:
标签: php .htaccess include apache2 server-side-includes