第一次从 TP5.1 转换到 TP6,在搭建项目的时候 报错: No input file secified.
解决方法: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>