在使用$this->request->param()和$this->request->get()时,会多出路由地址参数

解决方法
更改/public/.htaccess文件
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
本文介绍了解决使用$this->request->param()和$this->request->get()时出现的路由地址参数多余问题的方法。通过修改.htaccess文件中的重写规则,可以有效地避免路由参数的重复加载,确保应用程序正常运行。
1067

被折叠的 条评论
为什么被折叠?



