这是我的文件夹结构
+ Duplicate
+ Controllers
- LoginController.php
+ Models
+ Views
- Index.php
我的 http-vhosts.conf 文件的内容是:
ServerName example.dev
ServerAlias www.example.dev
DocumentRoot "C:/wamp/www/Duplicate/Views/"
<Directory "C:/wamp/www/Duplicate/Views/">
我的索引文件包含这样的标题
header("Location: ../Controllers/LoginController.php");
永远不会被LoginController
加载。这就是我对正在发生的事情的理解。
URL example.dev始终包含/Views/,因此即使我尝试将Location标头更改为父文件夹,路径也会附加到我的example.dev URL 中,该 URL 再次包含/Views/。
我该怎么做才能让它工作。我整天都在试图让它加载页面。