📄 正在查看:twcms/control/error404_control.class.php
1<?php
2/**
3 * (C)2012-2014 twcms.com TongWang Inc.
4 * Author: wuzhaohuan <kongphp@gmail.com>
5 */
6
7defined('TWCMS_PATH') or exit;
8
9class error404_control extends control{
10 public $_cfg = array(); // 全站参数
11 public $_var = array(); // 404页参数
12
13 public function index() {
14 // hook error404_control_index_before.php
15
16 header('HTTP/1.1 404 Not Found');
17 header("status: 404 Not Found");
18
19 $this->_cfg = $this->runtime->xget();
20 $this->_cfg['titles'] = '404 Not Found';
21 $this->_var['topcid'] = -1;
22
23 $this->assign('tw', $this->_cfg);
24 $this->assign('tw_var', $this->_var);
25
26 $GLOBALS['run'] = &$this;
27
28 // hook error404_control_index_after.php
29
30 $_ENV['_theme'] = &$this->_cfg['theme'];
31 $this->display('404.htm');
32 }
33}
34