function _404($msg = "", $filePath = "") { DEBUG && error($msg); Log::write($msg); if (empty($filePath) && C("404_TPL")) { $filePath = C("404_TPL"); } if (!is_file($filePath) || !is_readable($filePath)) { $filePath = HDPHP_TPL_PATH . '/404.html'; } set_http_state(404); include $filePath; exit; }
/** * 404错误 * @param string $msg 提示信息 * @param string $url 跳转url */ function _404($msg = "", $url = "") { DEBUG && halt($msg); //写入日志 Log::write($msg); if (empty($url) or C("404_URL")) { $url = C("404_URL"); } if ($url) { go($url); } else { set_http_state(404); } exit; }
function _404($msg = "", $filePath = "") { DEBUG && error($msg); Log::write($msg); Log::save(); if (empty($filePath) && C("404_TPL")) { $filePath = C("404_TPL"); } set_http_state(404); if (is_file($filePath) && is_readable($filePath)) { include $filePath; } exit; }
/** * 404页面 */ protected function _404() { set_http_state(404); $this->display('Template/system/404'); exit; }