本文整理汇总了PHP中ErrorHandler::error404方法的典型用法代码示例。如果您正苦于以下问题:PHP ErrorHandler::error404方法的具体用法?PHP ErrorHandler::error404怎么用?PHP ErrorHandler::error404使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErrorHandler
的用法示例。
在下文中一共展示了ErrorHandler::error404方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: File
function error404($params)
{
$this->controller->layout = "anony";
$installed = true;
$File = new File(TMP . 'install');
if ($File->exists()) {
$installed = false;
}
if (!$installed) {
$this->_outputMessage('install');
} else {
parent::error404($params);
}
}
示例2: error404
public function error404($params)
{
parent::error404($params);
$this->controller->layout = "www";
}
示例3: error404
/**
* error for miss anything
* @param $param
*/
public function error404($params)
{
if (isset($params['html'])) {
$this->controller->html = $params['html'] !== false;
unset($params['html']);
}
if ($this->controller->html && $this->controller->RedirectAcl->isRedirect()) {
$this->controller->notice[] = array("url" => "", "text" => "该页面不存在");
$this->controller->brief = true;
$this->controller->base = Configure::read('site.prefix');
$this->controller->set($params);
} else {
$this->controller->header('HTTP/1.0 404 Not Found');
$this->controller->header('Content-Type:text/html;charset=' . $this->controller->encoding);
if (!empty($params['code'])) {
echo $params['code'] . ':';
}
echo $params['msg'];
$this->controller->_stop();
}
parent::error404($params);
}
示例4:
function error404($params)
{
$this->catch404();
$this->runLevenshtein();
parent::error404($params);
}
示例5:
function error404($params)
{
$this->controller->layout = "error";
parent::error404($params);
}
示例6: basename
function error404($params)
{
$this->controller->plugin = basename(dirname(__FILE__));
$this->controller->layout = 'noswad_error';
parent::error404($params);
}
示例7: error404
public function error404($params)
{
$this->controller->redirect(array('controller' => 'pages', 'action' => 'index', 'error'));
parent::error404($params);
}
示例8: header
function error404($params)
{
header("HTTP/1.0 404 Not Found");
$this->controller->redirect(array('controller' => 'showerror', 'action' => '/'));
parent::error404($params);
}