【发布时间】:2014-07-22 00:11:13
【问题描述】:
这是我的文件夹结构
channel
- includes
- db_connect.php
- functions.php
- libs
- vendor
- composer.json
- v1
- .htacces
- index.php
这是我的 .htaccess 文件
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]
我对这一切都很陌生,我并不真正了解 .htaccess 文件或它的作用。当我尝试使用 url 连接时
http://localhost/channel/v1/index.php/test
我收到 404 错误。这是我用来获取测试参数的代码块
$app->post('/test',function(){
echo 'test is working';
})
如何让它正常工作?我在 ubuuntu 中做这一切
【问题讨论】: