查询后解决办法是打开public目录下的.htaccess文件,把:RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
改为:RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
完整版:
<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>
转载自https://blog.****.net/dhywjx/article/details/79648160