public function actionPower() { if(is_file($this->staticUrl.'/power.html') && (time() - filemtime($this->staticUrl.'/power.html')) < 600){ require_once($this->staticUrl.'/power.html'); }else{ ob_start(); $query = Content::findPublished(['taxonomy_id'=>'97'])->orderBy('sticky asc'); $page_id = $query->One()->id; $locals = $this->getPageContent($page_id); echo $this->render('power', $locals); file_put_contents($this->staticUrl.'/power.html', ob_get_contents()); } }
require_once($this->staticUrl.'/power.html'); }else{ ob_start(); $query = Content::findPublished(['taxonomy_id'=>'97'])->orderBy('sticky asc'); $page_id = $query->One()->id; $locals = $this->getPageContent($page_id); echo $this->render('power', $locals); file_put_contents($this->staticUrl.'/power.html', ob_get_contents());
$args = $this->controller->bindActionParams($this, $params); Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
$actionResult->action = $action; $result = $this->beforeAction($action); if ($runAction && $result === true) { $actionResult->isExecuted = true; $actionResult->result = $action->runWithParams($params); } else { $actionResult->isExecuted = false; $actionResult->result = $result; }
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$params = array_splice($this->catchAll, 1); } try { Xxl::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $actionsResult = $this->runAction($route, $params); $result = $actionsResult instanceof ActionResult ? $actionsResult->result : $actionsResult; if ($result instanceof \yii\web\Response) { return $result;
try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
if($siteStatus === '0') { $app->catchAll = ['site/close', 'message' => 'test']; } $app->run();
$_COOKIE = [ 'PHPSESSID' => 'vloqr4fapcspl8dqqqvbjh3pq4', '_csrf' => 'eefa632ad8a4796931321ea56f32270858d5b804d466b016207396883202638fa:2:{i:0;s:5:"_csrf";i:1;s:32:"F_oEtReatJe29n-Jv7YOJt_nLcq-JT-t";}', ];