我已经开始学习 F3 框架 (PHP) 并且已经运行了 Hello World 程序。
但是,我面临一个简单的问题,但我似乎无法理解我做错了什么。当我将index.php
文件保存在网络根目录(/var/www)上时,路由为 -
F3::route('GET /', 'home);
和 access http://localhost
,我得到了正确的输出。但是,如果我将 index.php 文件放在路径上/var/www/my_test/
并更改路由如下 -
F3::route('GET /my_test/', 'home')
并访问http://localhost/my_test/
我得到该 URL 不存在。
我在这里想念什么?