brophp设立404方法分享
brophp设置404方法分享
今天一个同学问我brophp怎么设置404,这里分享一下方法
1,自己准备一个404页面的模板,放在根目录的public下面,当然路径你可以自己定义。
2,首先在action.class.php中添加这么一个方法:
- static public function _404(){
- header("HTTP/1.0 404 Not Found");
- header("status: 404 Not Found");
- $my = new self();
- $my->display('public/404');
- }
3,在brophp/brophp.php中找到 $srccontrolerfile = APP_PATH."controls/".strtolower($_GET["m"]).".class.php";后面添加下面的代码:
- if(!file_exists($srccontrolerfile)){
- Action::_404();
- }
4,然后打开action.class.php,找到Debug::addmsg("没有{$_GET["a"]}这个操作!");
这一行的上面或者下面添加:
- self::_404();
OK,完毕!
有问题上微博:@安正超

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

404 codes are situation-specific and can be either front-end or back-end issues. In some cases, 404 errors can come from problems on the client side, such as spelling in the URL path that results in the page not being found. In other cases, , 404 errors may be caused by the web application not responding to the request correctly, such as missing interface implementation or empty database query results.

DJI has not confirmed any plans to introduce a new action camera yet. Instead, it seems that GoPro will get ahead of its rival this year, having teased that it will introduce two new action cameras on September 4. For context, these are expected to a

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

In the process of developing websites using PHP, 404 file or directory not found errors often occur. This error is usually caused by the file or directory not existing or the permissions of the file or directory being incorrect. This article will detail the common causes, solutions, and preventive measures for PHP 404 errors.

How to open a 404 website: 1. Choose a browser according to your preference; 2. You need to know the URL address of a 404 website, or search for "404 website list" or "random URL generator" in the search engine to find The addresses of some 404 websites; 3. Enter the address in the address bar of the browser, and then press the Enter key. The browser will try to connect to the address and return a 404 error page; 4. Before opening the 404 website, make sure The computer has the latest anti-virus software installed, and the browser's security settings are turned on.

Solution: 1. Refresh the page; 2. Clear cache and cookies; 3. Use alternative URLs; 4. Use search engine cache, etc.

Almost a year has passed since DJI released the Osmo Action 4 (curr. $299 on Amazon). Since then, the company has focused on its other divisions, including new RS camera gimbals. On top of that, it has introduced various drones as well like the Avata

Insta360hasreleasedanewactioncamera,itssecondoftheyearaftertheInsta360X4(curr.$499.99onAmazon).Asexpected,thecompanyhasintroducedtheGo3S,anupgradedthatGo3thatadds4Kvideorecordingcapabilities.Specifically,whileInst
