public function actionError() { AppLogService::addLog(); $reback_url = UrlService::buildWapUrl("/"); $this->layout = false; return $this->render("@blog/views/error/index.php", ["title" => "Page Not Found", "msg" => "404警告! 很不幸,您探索了一个未知领域!", "reback_url" => $reback_url]); }
public function actionError() { AppLogService::addLog(); $reback_url = UrlService::buildUrl("/"); if (preg_match("/^wap/", Yii::$app->request->getPathInfo())) { $reback_url = UrlService::buildWapUrl("/"); } $this->layout = false; return $this->render("index", ["title" => "Page Not Found", "msg" => "404警告! 很不幸,您探索了一个未知领域!", "reback_url" => $reback_url]); }