Home  >  Q&A  >  body text

When calling the controller method, no input file specified. appears.

QQ截图20200516165844.jpg

I am new to PHP and am using phpstrom phpstudy

The index method of the index controller can be accessed

--- -The url is: www.demo.coml

index controller's test1 method. Access prompt: No input file specified.

----The url is: www. demo.coml/test1

----The url is: www.demo.coml/index/test1

I have tried both of the above urls

A.jpg

When accessing the get method under the user controller under the admin module, the following message appears: No input file specified.

-- --url is: www.demo.com/admin/user/get

I just started to learn php, could you please tell me what is the problem in this situation?

MRWMRW1640 days ago1572

reply all(8)I'll reply

  • MRW

    MRW2020-05-24 19:21:32

    Uniform reply

    Thank you for your enthusiastic reply

    After the boss’s advice, the problem was solved

    The processing method is as follows:

    .htaccess file Change to:

    Options FollowSymLinks -IndexesRewriteEngine OnRewriteCond %{HTTP:Authorization} .RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} ! -fRewriteRule ^ index.php [L]

    Problem Solving

    reply
    0
  • 卖老冰棍的小女孩

    卖老冰棍的小女孩2020-05-20 15:42:18

    It may be a pseudo-static problem. If there is no configuration, add index.php after the domain name

    ##www.demo.com/index.php/admin/user/get

    reply
    1
  • WJ

    WJ2020-05-20 10:13:18

    It’s usually a pseudo-static problem. Take a look at the configuration of the .htaccess file

    reply
    1
  • 小萝卜头

    小萝卜头2020-05-16 18:10:29

    Not Baidu Big Brother企业微信截图_*58****777**5*.png<*p>

    <*p>

    reply
    1
  • MRW

    Baidu has gone through various attempts I have read all the posts including related issues within the forum, but the problem remains...

    MRW · 2020-05-16 18:16:52
    小萝卜头

    tp5? Is the php version 7? Reason: The PHP7 version access path will report the error No input file specified. This is because of routing problems. solve: 1: Open the public/.htaccess file; 2: Change the last line of code to :RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]

    小萝卜头 · 2020-05-19 14:27:47
    小萝卜头

    If you are studying, I recommend tpadmin. You can take a look. It is written in the tp5.0 framework.

    小萝卜头 · 2020-05-19 14:28:59
    小萝卜头

    If not, re-git tp framework code down

    小萝卜头 · 2020-05-19 14:30:07
  • Cancelreply