<?php $did = Yii::$app->request->get('id'); $dinfo = \app\models\HtDestination::findOne($did); \app\models\BaseConfig::setSeo($dinfo->new_seo_title,$dinfo->new_seo_key,$dinfo->new_seo_dis); ?> <!-- 横幅开始 --> <div class="index_banner"> <div id="owl-demo" class="owl-carousel"> <?php foreach(\app\models\HtTopimg::find()->where('did = '.$did)->asArray()->all() as $v){if(empty($v['img_path']))continue;?> <div class="item"><a class="hf2" href="<?=isset($v['link'])?$v['link']:''?>" style="background:url(<?=isset($v['img_path'])?\app\models\BaseConfig::getImg($v['img_path']):''?>) no-repeat center top;" target="_blank"></a></div> <?php }?> </div>
<?php $did = Yii::$app->request->get('id'); $dinfo = \app\models\HtDestination::findOne($did); \app\models\BaseConfig::setSeo($dinfo->new_seo_title,$dinfo->new_seo_key,$dinfo->new_seo_dis); ?> <!-- 横幅开始 --> <div class="index_banner"> <div id="owl-demo" class="owl-carousel"> <?php foreach(\app\models\HtTopimg::find()->where('did = '.$did)->asArray()->all() as $v){if(empty($v['img_path']))continue;?>
*/ public function renderPhpFile($_file_, $_params_ = []) { ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); require($_file_); return ob_get_clean(); } /** * Renders dynamic content returned by the given PHP statements.
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @throws InvalidParamException if the view cannot be resolved or the view file does not exist. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the path alias of the view file. Please refer to [[render()]] * on how to specify this parameter.
* These parameters will not be available in the layout. * @return string the rendering result. * @throws InvalidParamException if the view file or the layout file does not exist. */ public function render($view, $params = []) { $content = $this->getView()->render($view, $params, $this); return $this->renderContent($content); } /** * Renders a static string by applying a layout. * @param string $content the static string being rendered
use yii\web\Controller; class NewsController extends Controller { public function actionIndex() { return $this->render('index'); } public function actionInfo($id) { $new = HtNews::findOne($id); $new->view_num +=1; $new->save();
$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); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$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 = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $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();
require(__DIR__ . '/vendor/autoload.php'); require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/config/web.php'); (new yii\web\Application($config))->run();
$_GET = [ 'id' => '197', ]; $_SERVER = [ 'ALLUSERSPROFILE' => 'C:\\ProgramData', 'APPDATA' => 'C:\\Users\\Administrator\\AppData\\Roaming', 'CLIENTNAME' => 'DESKTOP-I5LV8F0', 'CommonProgramFiles' => 'C:\\Program Files (x86)\\Common Files', 'CommonProgramFiles(x86)' => 'C:\\Program Files (x86)\\Common Files', 'CommonProgramW6432' => 'C:\\Program Files\\Common Files', 'COMPUTERNAME' => 'AY1306291804070', 'ComSpec' => 'C:\\Windows\\system32\\cmd.exe', 'FP_NO_HOST_CHECK' => 'NO', 'HOMEDRIVE' => 'C:', 'HOMEPATH' => '\\Users\\Administrator', 'JAVA_HOME' => 'C:\\Program Files\\Java\\jdk1.8.0_181', 'lib' => 'C:\\Program Files\\SQLXML 4.0\\bin\\', 'LOCALAPPDATA' => 'C:\\Users\\Administrator\\AppData\\Local', 'LOGONSERVER' => '\\\\AY1306291804070', 'NUMBER_OF_PROCESSORS' => '4', 'OS' => 'Windows_NT', 'Path' => '.;C:\\Program Files\\Java\\jdk1.8.0_181\\bin;C:\\Program Files\\Java\\jdk1.8.0_181\\jre\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\websoft\\mysql\\bin;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\80\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\90\\Tools\\binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\90\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\90\\Tools\\Binn\\VSShell\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio 8\\Common7\\IDE\\PrivateAssemblies\\;c:\\Program Files (x86)\\Microsoft ASP.NET\\ASP.NET Web Pages\\v1.0\\;C:\\Program Files (x86)\\MySQL\\MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5\\;C:\\Program Files (x86)\\MySQL\\MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5\\Doctrine extensions for PHP\\;C:\\php;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\VSShell\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\PrivateAssemblies\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\DTS\\Binn\\', 'PATHEXT' => '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY', 'PROCESSOR_ARCHITECTURE' => 'x86', 'PROCESSOR_ARCHITEW6432' => 'AMD64', 'PROCESSOR_IDENTIFIER' => 'Intel64 Family 6 Model 79 Stepping 1, GenuineIntel', 'PROCESSOR_LEVEL' => '6', 'PROCESSOR_REVISION' => '4f01', 'ProgramData' => 'C:\\ProgramData', 'ProgramFiles' => 'C:\\Program Files (x86)', 'ProgramFiles(x86)' => 'C:\\Program Files (x86)', 'ProgramW6432' => 'C:\\Program Files', 'PROMPT' => '$P$G', 'PSModulePath' => 'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC' => 'C:\\Users\\Public', 'SESSIONNAME' => 'RDP-Tcp#0', 'SystemDrive' => 'C:', 'SystemRoot' => 'C:\\Windows', 'TEMP' => 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp', 'TMP' => 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp', 'USERDOMAIN' => 'AY1306291804070', 'USERNAME' => 'Administrator', 'USERPROFILE' => 'C:\\Users\\Administrator', 'windir' => 'C:\\Windows', 'windows_tracing_flags' => '3', 'windows_tracing_logfile' => 'C:\\BVTBin\\Tests\\installpackage\\csilogfile.log', 'HTTP_HOST' => 'dearvoyage.com', 'HTTP_ACCEPT_ENCODING' => 'gzip, br, zstd, deflate', 'HTTP_COOKIE' => 'RWSESSID=8a966f80b1379d17048acbadca360aed', 'HTTP_USER_AGENT' => 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', 'HTTP_ACCEPT' => '*/*', 'REDIRECT_STATUS' => '200', 'SERVER_NAME' => 'www.dearisland.com', 'SERVER_PORT' => '80', 'SERVER_ADDR' => '172.16.3.97', 'REMOTE_PORT' => '36756', 'REMOTE_ADDR' => '13.59.1.58', 'SERVER_SOFTWARE' => 'nginx/1.12.1', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'REQUEST_SCHEME' => 'http', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'DOCUMENT_ROOT' => 'D:/wwwroot/htdd', 'DOCUMENT_URI' => '/index.php', 'REQUEST_URI' => '/Other/Problem/197.html', 'SCRIPT_NAME' => '/index.php', 'CONTENT_LENGTH' => '', 'CONTENT_TYPE' => '', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => '', 'SCRIPT_FILENAME' => 'D:/wwwroot/htdd/index.php', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1735255163.626797, 'REQUEST_TIME' => 1735255163, ]; $_COOKIE = [ 'RWSESSID' => '8a966f80b1379d17048acbadca360aed', ];