Commit 88358602 authored by xiabin's avatar xiabin

修改播放事件

parent 9a5ddf19
......@@ -72,9 +72,6 @@ class SiteController extends Controller
public function actions()
{
return [
'error' => [
'class' => 'yii\web\ErrorAction',
],
'captcha' => [
'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => YII_ENV_DEV ? 'testme' : NULL,
......@@ -88,13 +85,20 @@ class SiteController extends Controller
}
// public function actionError()
// {
// $exception = Yii::$app->errorHandler->exception;
// if ($exception !== null) {
// return $this->render('error', ['exception' => $exception]);
// }
// }
/**
* @return string
*/
public function actionError()
{
$this->layout = FALSE;
$exception = Yii::$app->errorHandler->exception;
$name = Yii::$app->errorHandler->getExceptionName($exception);
$message = $exception->getMessage();
if ($exception !== null) {
return $this->render('error', ['name' => $name,
'message'=>$message]);
}
}
/**
* Logs in a user.
......
......@@ -7,12 +7,10 @@
use yii\helpers\Html;
$this->layout = FALSE;
$this->title = $name;
?>
<div class="container">
<div class="site-error">
<h1><?= Html::encode($this->title) ?></h1>
<div class="alert alert-danger">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment