ThinkPHP出现 No input file specified.的解决方法

出现这个报错的时候 首先查看根目录下的 .htaccess 文件
如下所示:倒数第二行 ^(.*)$ index.php

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

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

只需要把 倒数第二行的index.php 加一个?号就可以了

<IfModule mod_rewrite.c>
 Options +FollowSymlinks
 RewriteEngine On

 RewriteCond %{
    
    REQUEST_FILENAME} !-d
 RewriteCond %{
    
    REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>

猜你喜欢

转载自blog.csdn.net/weixin_43944691/article/details/103903337