TP6 Frequently Asked Questions summary

一、No input file specified.

Solution: Add a later rewrite the configuration file index.php?

 

Run as follows:

Second, what is being given but do not see an error message

Solution: The configuration file config / app.php file show_error_msg to true

Three, hello Thinkphp6 Index established following controller () method, can not access the illegal request: index / hello

hello Thinkphp6 Index was created under the controller () method can not be accessed, always suggesting illegal request, replaced by other methods were no problem, that is, hello can not be used.

The reason defines the route

route/app.php文件里屏蔽掉 Route::get('hello/:name', 'index/hello');

Fourth, there is no controller: app \ controller \ Admin

The reason given:

1, multi-application is not configured

2, the namespace does not

3. default entry file is not configured to run a user request

4. Note (multi-application): multi-application mode need to expand think-multi-app

Solution:

Execute the following command 

composer require topthink/think-multi-app

 

 Fifth, the load view: Driver [Think] not supported.

code show as below: 

Solution:

Command line to execute the command:

composer require topthink/think-view

 Then run you can see the following information only in accordance with the following error message into the corresponding file in the path where you can

Six, session issues

The reason for the next tp6 default is no open session, you need to call the middleware

Workaround: app / middleware.php in open session

Published 72 original articles · won praise 7 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_39399966/article/details/104860194