ThinkPHP empty method display, thinkphp
TP if a controller does not have a method, as long as there is a template, the URL will display the Template Name.
Example
Http: // localhost/yiyunmap/map/test
The map controller does not have the test method.
However, the template file contains test.html.
The URL is displayed.
How does thinkphp solve the 404 problem with null operations?
> This is not the case. By the way, I don't have a group. Will this affect the implementation of this function? Apart from creating an empty EmptyAction module, you also need to create a _ empty method in each controller. Each controller has one. Of course, public classes can be used to avoid repeated operations. Create a public class Controller: CommonAction. class. php <? Phpclass CommonAction extends Action {function _ empty () {header ("Location:/404.html") ;}}?> Copy the code and let other controllers inherit the controller, such as IndexAction extends CommonAction. The code of the empty method you posted also seems a bit problematic. Header ("Location:/404.html"); your code has been switched.
All thinkphp pages are blank
App debug enables or disables debugging mode, which has little to do with caching. If you want to delete the cache, you can delete all files and folders under the Runtime folder.