Unable to load template jump to page 404
/thinkphp/library/think/dispatcher.class.php in 176 rows
To load the module's extension configuration file
Load_ext_file (Module_path);
}else{
Header ("location:/404.html");d ie;
E (L (' _module_not_exist_ '). ': '. MODULE_NAME);
}
Plus the header jump page, 404.html on the following
Unable to load controller jump to 404 page
Create a EmptyController.class.php code as follows
<?php
namespace Home\controller;
Use Think\controller;
Class Emptycontroller extends Controller
{
Public Function _empty () {
$this->display (' error/404 ');//In the Error folder in Home/view
}
}
That's it.
Unable to load method jump to 404 page
In/thinkphp/library/think/controller.class.php 170 line plus redirect 404 page
Public Function __call ($method, $args) {
if (0 = = strcasecmp ($method, Action_name. C (' Action_suffix '))) {
if (method_exists ($this, ' _empty ')) {
If the _empty operation is defined, the call
$this->_empty ($method, $args);
}elseif (File_exists_case ($this->view->parsetemplate ())) {
Check if there is a default template if there is a direct output template
$this->display ();
}else{
$this->display (' error/404 ');
E (L (' _error_action_ '). ': '. Action_name);
}
}else{
E (__class__. ': '. $method. L (' _method_not_exist_ '));
Return
}
}
---------------------This article from the Great Lao Wang's blog, reprinted to 54943723
TP Frame Settings 404 page