phpstudy环境下thinkphp URL模式的问题

本地环境:phpstudy 2018
PHP 版本 7.2.10
thinkphp版本 3.2.3
故障描述:tp中设置url模式等于2的时候,点击链接提示No input file specified.
目前只能用0 1 3 就是2不能使用.
根目录下面.htaccess文件内容如下:

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

请教如何解决?

阅读 2.1k
1 个回答

把.htaccess文件中的#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
改成RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

刚刚搜索到答案了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题