已解决 phpstudy出现No input file specified

432 阅读1分钟

虽然已经解决了,但不知道为什么!!!

解决方法:

在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/$1 [QSA,PT,L]
</IfModule>

修改后的配置:

<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>