慕容的工作随笔

慕容的工作随笔

记录学习和工作

tp5.1用$this->request->param()接受数据多了一个参数 转

转自:https://blog.csdn.net/WYXXXXXXXXX/article/details/108408620

解决方案:

打开application目录下.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]
</IfModule>


正常是像上面这样的语句,我们把最后一句注释掉,然后加上
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?/$1 [QSA,PT,L]
  RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
OK,问题解决

评论 (0)

还没有评论,来做第一个吧。

发表评论

提交后需管理员审核通过后显示