Thinkphp makes a simple implementation of 404 jump pages, thinkphp makes 404 jump pages
There are many thinkphp 404 page creation methods on the Internet, but most of them are too cumbersome, not convenient, and annoying. So I shared the most convenient 404 creation method for you, as shown below.
Add configuration items in the config configuration file of the public directory of thinkphp:
'TMPL_EXCEPTION_FILE' => 'Public/404.html',
The content of 404.html created in the publicfolder is as follows:
<! DOCTYPE html>
This is done. Of course, the status code is 404, because thinkphp returns 404 if the page does not exist by default! Finally, I would like to recommend a source code community named the original source code library. A good website may help you!
The above is all the simple implementation of thinkphp's 404 page Jump Method for everyone. I hope it will be helpful to you and support more help ~