Home>Article>PHP Framework> How to quickly implement 404 jump page in Thinkphp
The followingthinkphp frameworktutorial column will introduce to you how to create a 404 jump page in Thinkphp. I hope it will be helpful to friends in need!
Thinkphp makes 404 jump page
There are many thinkphp 404 page making methods on the Internet, but most of them are too cumbersome, inconvenient, and annoying, so I share them with you. The most convenient way to make 404 is as follows.
Add configuration items to the config configuration file in the public directory of thinkphp:
'TMPL_EXCEPTION_FILE' => 'Public/404.html',
Create 404.html in the Public folder with the following content
404哟 404
该页面不存在(′?ω?`)5秒后跳转到首页
This is done. As for the status code, of course it is 404, because thinkphp returns 404 by default for pages that do not exist, and you’re done!
Recommended learning: "The latest 10 thinkphp video tutorials"
The above is the detailed content of How to quickly implement 404 jump page in Thinkphp. For more information, please follow other related articles on the PHP Chinese website!