$path = $this->rule->parseUrlPath($url);
if (empty($path)) {
return [null, null];
}
// 解析控制器
$controller = !empty($path) ? array_shift($path) : null;
if ($controller && !preg_match('/^[A-Za-z0-9][\w|\.]*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}
// 解析操作
$action = !empty($path) ? array_shift($path) : null;
$var = [];
// 解析额外参数
if ($path) {
preg_replace_callback('/(\w+)\|([^\|]+)/', function ($match) use (&$var) {
REDIRECT_UNIQUE_ID | ZgZb7ay7qX4PSY458PGQBAAAAAI |
REDIRECT_PHPRC | /home/host6185hho5sptr631t8/others |
REDIRECT_HANDLER | php-cgi |
REDIRECT_STATUS | 200 |
UNIQUE_ID | ZgZb7ay7qX4PSY458PGQBAAAAAI |
PHPRC | /home/host6185hho5sptr631t8/others |
HTTP_X_FORWARDED_FOR | 3.238.12.0 |
HTTP_X_REAL_IP | 211.149.243.4 |
HTTP_HOST | www.bbt3.com |
HTTP_CONNECTION | close |
HTTP_FROM_HTTPS | on |
HTTP_SSL_FLAG | SSL |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_X_FORWARDED_PROTO | https |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_REFERER | http://www.bbt3.com/about-us/ |
PATH | /sbin:/usr/sbin:/bin:/usr/bin |
SERVER_SIGNATURE | <address>Apache Server at www.bbt3.com Port 80</address> |
SERVER_SOFTWARE | Apache |
SERVER_NAME | www.bbt3.com |
SERVER_ADDR | 127.0.0.1 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.238.12.0 |
DOCUMENT_ROOT | /home/host6185hho5sptr631t8/wwwroot/public |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | /php-run-as-cgi |
CONTEXT_DOCUMENT_ROOT | /usr/php7.3/bin |
SERVER_ADMIN | webmaster@host618 |
SCRIPT_FILENAME | /home/host6185hho5sptr631t8/wwwroot/public/index.php |
REMOTE_PORT | 33306 |
REDIRECT_URL | /index.php/about-us/ |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /index.php/about-us/ |
SCRIPT_NAME | /index.php |
PATH_INFO | /about-us/ |
PATH_TRANSLATED | /home/host6185hho5sptr631t8/wwwroot/public/about-us/ |
ORIG_PATH_INFO | /index.php/about-us/ |
ORIG_SCRIPT_NAME | /php-run-as-cgi/php-cgi |
ORIG_SCRIPT_FILENAME | /usr/php7.3/bin/php-cgi |
ORIG_PATH_TRANSLATED | /home/host6185hho5sptr631t8/wwwroot/public/index.php/about-us/ |
PHP_SELF | /index.php/about-us/ |
REQUEST_TIME_FLOAT | 1711692781.2041 |
REQUEST_TIME | 1711692781 |