error.php 1.2 KB
Newer Older
Qiang Xue committed
1 2 3
<?php
/**
 * @var \Exception $exception
Qiang Xue committed
4
 * @var \yii\base\ErrorHandler $context
Qiang Xue committed
5
 */
Qiang Xue committed
6
$context = $this->context;
Qiang Xue committed
7
$title = $context->htmlEncode($exception instanceof \yii\base\Exception ? $exception->getName() : get_class($exception));
Qiang Xue committed
8 9 10 11
?>
<!DOCTYPE html>
<html>
<head>
12
	<meta charset="utf-8" />
13
	<title><?php echo $title?></title>
Qiang Xue committed
14

15
	<style>
Qiang Xue committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
	body {
		font: normal 9pt "Verdana";
		color: #000;
		background: #fff;
	}

	h1 {
		font: normal 18pt "Verdana";
		color: #f00;
		margin-bottom: .5em;
	}

	h2 {
		font: normal 14pt "Verdana";
		color: #800000;
		margin-bottom: .5em;
	}

	h3 {
		font: bold 11pt "Verdana";
	}

	p {
		font: normal 9pt "Verdana";
		color: #000;
	}

	.version {
		color: gray;
		font-size: 8pt;
		border-top: 1px solid #aaa;
		padding-top: 1em;
		margin-bottom: 1em;
	}
	</style>
</head>

<body>
54
	<h1><?php echo $title?></h1>
Qiang Xue committed
55
	<h2><?php echo nl2br($context->htmlEncode($exception->getMessage()))?></h2>
Qiang Xue committed
56 57 58 59
	<p>
		The above error occurred while the Web server was processing your request.
	</p>
	<p>
Qiang Xue committed
60
		Please contact us if you think this is a server error. Thank you.
Qiang Xue committed
61 62
	</p>
	<div class="version">
63
		<?php echo date('Y-m-d H:i:s', time())?>
Qiang Xue committed
64
		<?php echo YII_DEBUG ? $context->versionInfo : ''?>
Qiang Xue committed
65 66
	</div>
</body>
Zander Baldwin committed
67
</html>