No input file specified. How to solve this?
........
........ 2018-12-21 16:34:22
0
8
3075

No input file specified.How to solve this

........
........

reply all(6)
王先生

Done, it is indeed a problem configured in the .htaccess file. At first I couldn't find where this file was placed. There was a lot of nonsense on the Internet. Some information said that this file should be modified, but there was no explanation of where this file was placed (the file could not be found. Then I need to modify the thread).

.htaccess This file is under the \tp5\public directory. Open this file and put RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] in the line after index.php Add a question mark "?" (question mark in English):

Before modification:

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

Modify After

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


##Remember to restart the Apache server after modification.

Later I looked for a lot of information and found that https://blog.csdn.net/marswill/article/details/88574607 this person wrote the same thing as I realized it myself

If this file is not found, you may need to enable .htaccess first. The enabling method is as follows:

Open httpd.conf (where? In the CONF directory of the APACHE directory), open it with a text editor, and search for

AllowOverride None

Modify it to

AllowOverride All


Remove the comment in front of mod_rewrite.so (just delete the # (pound sign) or; (semicolon) in front of it)

LoadModule rewrite_module modules/mod_rewrite.so


##Hope it helps, brother. This is how I solved my problem

王先生

Same problem, tried many methods but nothing worked. It says that I need to modify a .htaccess file, but I can’t find the file

晨风不可依米

I also have this problem, how did you solve it before? please inform!

Peter-Zhu

This prompt will also appear if the PHP version is too low, try switching to 7.0+

  • reply Thank you, but it still doesn't work. The error always appears. Is there any other way?
    ........ author 2018-12-21 23:47:33
........
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/21 0021
 * Time: 下午 15:02
 */

namespace app\admin\controller;   
use think\facade\config;    
class user
{
      public function get()    
      {
         dump(config::get());    
       }
}

无标题.png still displays No input file specified

我★独依→亻

The path is wrong. . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!