$Cate['Internet']=$Internet; $view = YII::$app->view; $view->params["cate"] = $Cate; if (empty($_GET['Id'])) { $Article= Product::find()->where(["=","CateId",$_GET['CateId']])->one(); $Article->ClickNum=intval($Article->ClickNum)+1; }else{ $Article= Product::find()->where(["=","Id",$_GET['Id']])->one(); $Article->ClickNum=intval($Article->ClickNum)+1; } if ($Article->IsPc=="0") {//移动端的 $Article->Content=str_replace("global.css","pc_product.css",$Article->Content); } $Article->save(); $set=Set::find()->where(["Id"=>2])->one(); $set["Description"]= $Article['Detail']; $set["Title"]=$Article['Title']."-".$set["Title"];
if (empty($_GET['Id'])) { $Article= Product::find()->where(["=","CateId",$_GET['CateId']])->one(); $Article->ClickNum=intval($Article->ClickNum)+1; }else{ $Article= Product::find()->where(["=","Id",$_GET['Id']])->one(); $Article->ClickNum=intval($Article->ClickNum)+1; } if ($Article->IsPc=="0") {//移动端的 $Article->Content=str_replace("global.css","pc_product.css",$Article->Content); } $Article->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) . '".');
$route = $this->catchAll[0]; $params = array_splice($this->catchAll, 1); } 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();
unset($config['components']['urlManager']['suffix']); } // if ($_SERVER["REMOTE_ADDR"]=="183.128.177.207") { // echo "<pre>"; // var_dump($config);exit; // } (new yii\web\Application($config))->run();
$_GET = [ 'Id' => '2', ]; $_SERVER = [ 'PHP_EXTRA_CONFIGURE_ARGS' => '--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi', 'HOSTNAME' => 'e7b5a3070b00', 'PHP_INI_DIR' => '/usr/local/etc/php', 'SHLVL' => '1', 'HOME' => '/home/www-data', 'PHP_LDFLAGS' => '-Wl,-O1 -Wl,--hash-style=both -pie', 'PHP_CFLAGS' => '-fstack-protector-strong -fpic -fpie -O2', 'PHP_MD5' => '', 'PHP_VERSION' => '5.6.40', 'GPG_KEYS' => '0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3', 'PHP_CPPFLAGS' => '-fstack-protector-strong -fpic -fpie -O2', 'PHP_ASC_URL' => 'https://secure.php.net/get/php-5.6.40.tar.xz.asc/from/this/mirror', 'PHP_URL' => 'https://secure.php.net/get/php-5.6.40.tar.xz/from/this/mirror', 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'PHPIZE_DEPS' => 'autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c', 'PWD' => '/var/www/html', 'PHP_SHA256' => '1369a51eee3995d7fbd1c5342e5cc917760e276d561595b6052b21ace2656d1c', 'USER' => 'www-data', 'FCGI_ROLE' => 'RESPONDER', 'SCRIPT_FILENAME' => '/var/www/html/compoy/web/index.php', 'QUERY_STRING' => 'Id=2', 'REQUEST_METHOD' => 'GET', 'CONTENT_TYPE' => '', 'CONTENT_LENGTH' => '', 'SCRIPT_NAME' => '/index.php', 'REQUEST_URI' => '/home/productdetail.html?Id=2', 'DOCUMENT_URI' => '/index.php', 'DOCUMENT_ROOT' => '/usr/share/nginx/html/compoy/web', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_SCHEME' => 'https', 'HTTPS' => 'on', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_SOFTWARE' => 'nginx/1.17.2', 'REMOTE_ADDR' => '3.233.219.31', 'REMOTE_PORT' => '46626', 'SERVER_ADDR' => '172.27.0.8', 'SERVER_PORT' => '443', 'SERVER_NAME' => 'compoy.com', 'REDIRECT_STATUS' => '200', 'HTTP_ACCEPT' => '*/*', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_HOST' => 'www.compoy.com', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1711718493.5381501, 'REQUEST_TIME' => 1711718493, 'argv' => [ 'Id=2', ], 'argc' => 1, ];