$country = Yii::$app->request->get('country',0); $page = Yii::$app->request->get('page', 1); $rank = Yii::$app->request->get('rank', 0);// 排行 $major = Yii::$app->request->get('major', 172);//专业方向 $majorDetails = Yii::$app->request->get('majorDetails', 0);//专业详情 $type = Yii::$app->request->get('type', '');// $schoolSystem = Yii::$app->request->get('schoolSystem', '');//公立还是私立 $tuition = Yii::$app->request->get('tuition', '');//学费 $result = file_get_contents("http://schools.viplgw.cn/schools.html?data-type=json&country=$country&rank=$rank&major=$major&majorDetails=$majorDetails&page=$page"); $result = json_decode($result, true); $url = "/schools/$country/$rank/$major/$majorDetails/"; $pageModel = new Pager($url,$result['data']['count'],$page,10); $pattern = '/\/\=(\d+)/'; $replacement = '/${1}$2.html'; $pageStr = preg_replace($pattern, $replacement, $pageModel->GetPagerContent()); $this->title = '美国大学,世界大学排名,国外大学,国外留学,海外留学院校信息大全,申友留学官网'; $this->keywords = '申友留学,出国留学院校库,留学院校,海外院校,院校搜索,院校大全,海外大学排名,院校信息,热门留学专业,国外大学课程设置,留学申请条件,出国留学如何选校,申友留学官网'; $this->description = '申友留学提供美加英澳新欧亚等多国院校数据库,收录美国大学,英国大学,澳洲大学,加拿大大学,新加坡大学,香港地区大学等近3000所院校的排名,简介,留学费用,大学入学要求,出国留学专业设置//关信息';
$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); } }
$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();
// default: // break; // } //} error_reporting(E_ALL); (new yii\web\Application($config))->run();
$_GET = [ 'country' => '155', 'rank' => '0', 'major' => '172', 'majorDetails' => '226', 'page' => '5', ]; $_SERVER = [ 'REDIRECT_UNIQUE_ID' => 'Zge39iww7DU3a0H6R2BYWAAAAEY', 'REDIRECT_HTTPS' => 'on', 'REDIRECT_SSL_TLS_SNI' => 'www.thinkwithu.com', 'REDIRECT_STATUS' => '200', 'UNIQUE_ID' => 'Zge39iww7DU3a0H6R2BYWAAAAEY', 'HTTPS' => 'on', 'SSL_TLS_SNI' => 'www.thinkwithu.com', 'HTTP_ACCEPT' => '*/*', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_HOST' => 'www.thinkwithu.com', 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'SERVER_SIGNATURE' => '', 'SERVER_SOFTWARE' => 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40', 'SERVER_NAME' => 'www.thinkwithu.com', 'SERVER_ADDR' => '172.18.175.120', 'SERVER_PORT' => '443', 'REMOTE_ADDR' => '54.224.52.210', 'DOCUMENT_ROOT' => '/var/www/html/thinkwithu/web', 'REQUEST_SCHEME' => 'https', 'CONTEXT_PREFIX' => '', 'CONTEXT_DOCUMENT_ROOT' => '/var/www/html/thinkwithu/web', 'SERVER_ADMIN' => 'root@localhost', 'SCRIPT_FILENAME' => '/var/www/html/thinkwithu/web/index.php', 'REMOTE_PORT' => '55180', 'REDIRECT_URL' => '/schools/155/0/172/226/5.html', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => '', 'REQUEST_URI' => '/schools/155/0/172/226/5.html', 'SCRIPT_NAME' => '/index.php', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1711781878.566, 'REQUEST_TIME' => 1711781878, ]; $_SESSION = [ '__flash' => [], ];