下面是thinkphp5.1 官方文档给出的配置,可能不好使
.htaccess改成下面亲测可用
<IfModule mod_rewrite.c> ?Options +FollowSymlinks -Multiviews ?RewriteEngine On ?RewriteCond %{REQUEST_FILENAME} !-d ?RewriteCond %{REQUEST_FILENAME} !-f ?????RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]</IfModule>
thinkphp5.1的默认报错级别不太适合开发,可以在配置文件app.php加上:error_reporting(E_ERROR | E_PARSE ); //设置报错级别
thinkphp5.1 tp5.1 安装 初始化 配置 重写 url 路由 Rewrite
原文地址:https://www.cnblogs.com/shaoing/p/8417034.html