This article describes the methods for customizing error pages and prompting pages in thinkphp. Share to everyone for your reference. The implementation method is as follows:
In thinkphp there are two methods when the error page _404 (' Error message ', ' Jump address ') is indicated, halt (' hint message ');
Both functions can customize the error page in the configuration file and copy the code code as follows: ' tmpl_exception_file ' = './public/tpl/error.html '
This will jump to this page every time.
Here is my custom error page
Copy the Code code as follows: After (3) seconds automatically jump, or click here to jump stop
$this->success (' Error message ', ' jump address (preferably with u ()) ', time);
$this->error ();
Here are the tips page that I changed thinkphp
Copy the Code code as follows:
Hint Message-thinkphp
Ok
<?php Echo ($message);?>
X
In ( <?php Echo ($waitSecond);?> ) seconds after the automatic jump, or directly click ' "> here to jump
Stop
It is hoped that this article will be helpful to everyone's thinkphp framework design.