在ThinkPHP中有两个方法时提示错误页面 _404('错误信息','跳转的地址');halt('示信息');
这两个函数都可以自定义错误页面在配置文件中加 'TMPL_EXCEPTION_FILE'=>'./Public/Tpl/error.html'
这样每次就会跳转到这个页面。
下面是我定制的错误页面
x
在( 3 )秒后自动跳转,或直接点击 这里 跳转 停止
$this->success('错误信息','跳转的地址(最好用U())',时间);
$this->error();
下面是我改变ThinkPHP中的提示页面
提示消息 - ThinkPHP
body { font: 75% Arail; text-align: center; }
#notice { width: 300px; background: #FFF; border: 1px solid #BBB; background: #EEE; padding: 3px;
position: absolute; left: 50%; top: 50%; margin-left: -155px; margin-top: -100px; }
#notice div { background: #FFF; padding: 30px 0 20px; font-size: 1.2em; font-weight:bold }
#notice p { background: #FFF; margin: 0; padding: 0 0 20px; }
a { color: #f00} a:hover { text-decoration: none; }
"message">
"font: italic bold 2cm cursive,serif; color:green">
ok |