mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
404异常跳转URL配置参数 改为 异常模板地址参数 http_exception_template
This commit is contained in:
@@ -223,7 +223,7 @@ class Response
|
||||
public function header($name, $value = null)
|
||||
{
|
||||
if (is_array($name)) {
|
||||
$this->header = $name;
|
||||
$this->header = array_merge($this->header, $name);
|
||||
} else {
|
||||
$this->header[$name] = $value;
|
||||
}
|
||||
|
||||
@@ -95,10 +95,10 @@ class Handle
|
||||
*/
|
||||
protected function renderHttpException(HttpException $e)
|
||||
{
|
||||
$status = $e->getStatusCode();
|
||||
$error = Config::get('http_exception_url');
|
||||
if (!APP_DEBUG && !empty($error[$status])) {
|
||||
return Response::create($error[$status], 'redirect')->send();
|
||||
$status = $e->getStatusCode();
|
||||
$template = Config::get('http_exception_template');
|
||||
if (!APP_DEBUG && !empty($template[$status])) {
|
||||
return Response::create($template[$status], 'view')->vars(['e' => $e])->send();
|
||||
} else {
|
||||
return $this->convertExceptionToResponse($e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user