$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; } }
} 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; $_GET = $params + $_GET; // preserve numeric keys return [$route, $_GET]; } else {
* @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__ . '/vendor/autoload.php'); require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/app/config/web.php'); Yii::setAlias('rootPath', __DIR__ . "/"); Yii::setAlias('app', dirname(dirname(__DIR__)) . '/app'); Yii::setAlias('next', __DIR__ . '/app/modules/nextadmin'); (new yii\web\Application($config))->run(); ?>
$_GET = [ 'start' => '', ]; $_SERVER = [ 'HTTPS' => 'on', 'SSL_TLS_SNI' => 'cer.uz', 'HTTP_ACCEPT' => '*/*', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_REFERER' => 'http://cer.uz/index.php?start', 'HTTP_HOST' => 'cer.uz', 'PATH' => '/usr/bin:/bin', 'SERVER_SIGNATURE' => 'Apache/2.4.38 (Debian) Server at cer.uz Port 443 ', 'SERVER_SOFTWARE' => 'Apache/2.4.38 (Debian)', 'SERVER_NAME' => 'cer.uz', 'SERVER_ADDR' => '172.21.21.52', 'SERVER_PORT' => '443', 'REMOTE_ADDR' => '54.160.244.62', 'DOCUMENT_ROOT' => '/var/www/new.cer.uz', 'REQUEST_SCHEME' => 'https', 'CONTEXT_PREFIX' => '', 'CONTEXT_DOCUMENT_ROOT' => '/var/www/new.cer.uz', 'SERVER_ADMIN' => 'webmaster@localhost', 'SCRIPT_FILENAME' => '/var/www/new.cer.uz/index.php', 'REMOTE_PORT' => '43254', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => 'start', 'REQUEST_URI' => '/index.php?start', 'SCRIPT_NAME' => '/index.php', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1710852664.875125, 'REQUEST_TIME' => 1710852664, ];