$this->description = '申友网留学问答平台,云集申友网专业负责顾问,在这里可以提出包括留学申请、背景提升、学校专业、语言备考、文书写作、留学生活等多方面的任何疑问,精确找到你想要的答案。来申友网,找好顾问!来申友网,找好顾问,帮你筛选优质留学中介!'; return $this->render('question-new', ['school' => $data['school'], 'tags' => $data['tags'], 'whole' => $data['whole'], 'newest' => $data['newest'], 'recommend' => $data['recommend'], 'teacher' => $teacher, 'myAnswer' => $data['myAnswer'], 'topicAll' => $data['topicAll'], 'topicHot' => $data['topicHot'], 'topicMy' => $data['topicMy']]); } //问答详情页 测试 public function actionQuestionDetail() { $seeId = Yii::$app->request->get('seeId'); $data = json_decode(file_get_contents("https://liuxue.thinkwithu.com/cn/api/question-detail?seeId=$seeId"), true); $teacher = Content::getContent(['fields' => 'speaker,job', 'category' => "140", 'pageSize' => 6]); $this->title = $data['question']['question'] . '_留学问答_专业全面留学知识问答平台_申友网'; $this->keywords = '留学问答、美国留学、英国留学、留学申请、背景提升、学校专业、语言备考、文书写作、留学生活、申友网'; $this->description = '申友网留学问答平台,云集申友网专业负责顾问,在这里可以提出包括留学申请、背景提升、学校专业、语言备考、文书写作、留学生活等多方面的任何疑问,精确找到你想要的答案。来申友网,找好顾问!'; return $this->render('question-new-details', ['school' => $data['school'], 'question' => $data['question'], 'relevantQuestion' => $data['relevantQuestion'], 'answer' => $data['answer'], 'teacher' => $teacher, 'unanswered' => $data['unanswered'], 'topicHot' => $data['topicHot'], 'belong_topic' => $data['belong_topic'], 'belong_tags' => $data['belong_tags']]); } //提问页 测试 public function actionAddQuestion()
$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 = [ 'seeId' => '1520', ]; $_SERVER = [ 'REDIRECT_UNIQUE_ID' => 'ZgasZ-1fZ4amF3AnSRi0SwAAAFc', 'REDIRECT_HTTPS' => 'on', 'REDIRECT_SSL_TLS_SNI' => 'www.thinkwithu.com', 'REDIRECT_STATUS' => '200', 'UNIQUE_ID' => 'ZgasZ-1fZ4amF3AnSRi0SwAAAFc', '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' => '35.175.200.199', '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' => '41740', 'REDIRECT_URL' => '/question-detail/1520.html', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => '', 'REQUEST_URI' => '/question-detail/1520.html', 'SCRIPT_NAME' => '/index.php', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1711713383.3610001, 'REQUEST_TIME' => 1711713383, ]; $_SESSION = [ '__flash' => [], ];