tp5 No input file specified.

Mine is windows10 system, phpstudy environment, configured local virtual machine, tp5.1

Access and directory are normal

TIM screenshot 20180417083736.png

Error accessing secondary page

TIM screenshot 20180417083753.png

For the problem of tp5 No input file specified., it is actually a configuration problem of the .htaccess file

The source file is like this

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

After modification, access is normal

TIM screenshot 20180417083836.png

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324608452&siteId=291194637