【发布时间】:2015-08-03 02:49:36
【问题描述】:
我想使用 .htaccess 文件预先附加一个 php 文件。这个我知道怎么做。
# Prepend file.php
php_value auto_prepend_file "/path/to/file.php"
事情变得有点棘手,因为 file.php 有一个包含。
include("assets/something.php");
这会对子目录中的页面造成问题吗?是否有一种万无一失的方法来编写路径,以便无论 file.php 被预先附加在哪里,它仍然可以工作?
【问题讨论】:
标签: php .htaccess include include-path