【发布时间】:2017-08-28 18:25:06
【问题描述】:
我的应用程序无法使用 Slim Framework 和 apache。
Route Slim,不起作用
$app->group("/teste", function() {
$this->get("/", function(Request $request, Response $response, $args = []) {
return $response->write("deu");
});
$this->get("/:nome", function(Request $request, Response $response, $args = []) {
return $response->write("deu ".$args['nome']);
});
});
.htaccess in use 和 index.php(Slim) 在同一位置:public_html/slim/biblioteca/
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
尝试访问路由/teste/时返回错误500
可能需要配置或创建 httpd.conf 并启用 .htaccess?也允许覆盖所有。
在 /etc/ 中未找到此文件
可以帮助我吗?
Printscreen 项目列表文件
【问题讨论】:
-
检查您的错误日志以查看导致 500 的原因。
标签: php linux apache .htaccess slim