Solve the problem of "No input file specified" when thinkphp starts

Solve the problem of "No input file specified" when thinkphp starts

When learning thinkphp, we can access the default index, but the newly created method cannot.

Searching the relevant information on the Internet shows that the PHP5.6 used is the fast_cgi mode, and in some cases, the error caused by path_info cannot be correctly identified.

Therefore, we need to find the .htaccess file and change it to the following

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
    RewriteEngine On

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

You can access normally

Guess you like

Origin blog.csdn.net/shgzzd/article/details/125497072