$pathInfo = substr($pathInfo, strlen($scriptUrl)); } elseif ($baseUrl === '' || strpos($pathInfo, $baseUrl) === 0) { $pathInfo = substr($pathInfo, strlen($baseUrl)); } elseif (isset($_SERVER['PHP_SELF']) && strpos($_SERVER['PHP_SELF'], $scriptUrl) === 0) { $pathInfo = substr($_SERVER['PHP_SELF'], strlen($scriptUrl)); } else { throw new InvalidConfigException('Unable to determine the path info of the current request.'); } if ($pathInfo[0] === '/') { $pathInfo = substr($pathInfo, 1); } return (string) $pathInfo; } /** * Returns the currently requested absolute URL. * This is a shortcut to the concatenation of [[hostInfo]] and [[url]].
} elseif (isset($_SERVER['PHP_SELF']) && strpos($_SERVER['PHP_SELF'], $scriptUrl) === 0) { $pathInfo = substr($_SERVER['PHP_SELF'], strlen($scriptUrl)); } else { throw new InvalidConfigException('Unable to determine the path info of the current request.'); } if ($pathInfo[0] === '/') { $pathInfo = substr($pathInfo, 1); } return (string) $pathInfo; }
* Note, the returned path info is already URL-decoded. * @throws InvalidConfigException if the path info cannot be determined due to unexpected server configuration */ public function getPathInfo() { if ($this->_pathInfo === null) { $this->_pathInfo = $this->resolvePathInfo(); } return $this->_pathInfo; } /**
* @return array|boolean the route and the associated parameters. The latter is always empty * if [[enablePrettyUrl]] is false. False is returned if the current request cannot be successfully parsed. */ public function parseRequest($request) { if ($this->enablePrettyUrl) { $pathInfo = $request->getPathInfo(); /* @var $rule UrlRule */ foreach ($this->rules as $rule) { if (($result = $rule->parseRequest($this, $request)) !== false) { return $result; } }
* Resolves the current request into a route and the associated parameters. * @return array the first element is the route, and the second is the associated parameters. * @throws NotFoundHttpException if the request cannot be resolved. */ public function resolve() { $result = Yii::$app->getUrlManager()->parseRequest($this); if ($result !== false) { list ($route, $params) = $result; if ($this->_queryParams === null) { $_GET = $params + $_GET; // preserve numeric keys } else { $this->_queryParams = $params + $this->_queryParams;
* @return Response the resulting response * @throws NotFoundHttpException if the requested route is invalid */ public function handleRequest($request) { if (empty($this->catchAll)) { list ($route, $params) = $request->resolve(); } else { $route = $this->catchAll[0]; $params = $this->catchAll; unset($params[0]); } try {
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__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
$_SERVER = [ 'PATH' => '/usr/local/bin:/bin:/usr/bin', 'HTTP_ACCEPT' => '*/*', 'HTTP_HOST' => 'katalogfirm.london', 'HTTP_REFERER' => 'https://www.katalogfirm.london/user', 'HTTP_USER_AGENT' => 'claudebot', 'DOCUMENT_ROOT' => '/home/katfirm/domains/katalogfirm.london/private_html', 'REMOTE_ADDR' => '44.204.34.64', 'REMOTE_PORT' => '49900', 'SERVER_ADDR' => '5.187.55.123', 'SERVER_NAME' => 'katalogfirm.london', 'SERVER_ADMIN' => 'webmaster@katalogfirm.london', 'SERVER_PORT' => '443', 'REQUEST_SCHEME' => 'https', 'REQUEST_URI' => '/user', 'REDIRECT_URL' => '/user', 'REDIRECT_REQUEST_METHOD' => 'GET', 'HTTPS' => 'on', 'REDIRECT_STATUS' => '200', 'X_SPDY' => 'HTTP2', 'SSL_PROTOCOL' => 'TLSv1.3', 'SSL_CIPHER' => 'TLS_AES_256_GCM_SHA384', 'SSL_CIPHER_USEKEYSIZE' => '256', 'SSL_CIPHER_ALGKEYSIZE' => '256', 'SCRIPT_FILENAME' => '/home/katfirm/domains/katalogfirm.london/private_html/backend/web/index.php', 'QUERY_STRING' => '', 'SCRIPT_URI' => 'https://katalogfirm.london/user', 'SCRIPT_URL' => '/user', 'SCRIPT_NAME' => '/backend/web/index.php', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'SERVER_SOFTWARE' => 'LiteSpeed', 'REQUEST_METHOD' => 'GET', 'X-LSCACHE' => 'on', 'PHP_SELF' => '/backend/web/index.php', 'REQUEST_TIME_FLOAT' => 1711651251.801428, 'REQUEST_TIME' => 1711651251, ];