我在当地有一个小项目。我在 Windows 下使用 XAMPP 工作。我的文件目录结构是:
根目录:
C:\xampp\htdocs\routes
Under this folder, I have my
bootstrap.php with the configuration I want to initialize my project.
公共文件夹:
C:\xampp\htdocs\routes\htdocs
Under this folder I have my
index.php and my
.htaccess.
里面这个.htaccess我有以下配置:
php_value include_path .:/routes
php_value auto_prepend_file bootstrap.php
如果我做一个获取包含路径()在 - 的里面索引.php, 表明“.:/路线”。
但是我在网络浏览器上收到的消息(输入后http://localhost/routes/htdocs
) 一直是:
Fatal error: Unknown: Failed opening required 'bootstrap.php' (include_path='.:/routes') in Unknown on line 0
我在 .htaccess 中尝试了很多 include_path 的组合:
php_value include_path ".:/routes"
php_value include_path .:../routes
php_value include_path ".:./routes"
php_value include_path ".:routes"
...
我的httpd.conf的配置是:
DocumentRoot "C:/xampp/htdocs"
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory /routes>
AllowOverride all
</Directory>
如果我将引导程序中的信息硬编码在索引.php,它有效(至少这告诉我引导程序内的要求配置良好)。
我不知道如何让我的项目识别 bootstrap.php。
我缺少什么?我究竟做错了什么?
预先感谢您的帮助