$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 = [];// 解析額外參數(shù)if ($path) {preg_replace_callback('/(\w+)\|([^\|]+)/', function ($match) use (&$var) {
| t | 92d7540e476b153862b4ea2356ede7b3 |
| r | 8148 |
| USER | www |
| HOME | /home/www |
| HTTP_USER_AGENT | Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
| HTTP_REFERER | http://www.baidu.com |
| HTTP_COOKIE | t=92d7540e476b153862b4ea2356ede7b3; r=8148 |
| HTTP_ACCEPT_LANGUAGE | zh-CN,zh |
| HTTP_ACCEPT_ENCODING | gzip, deflate |
| HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
| HTTP_CONTENT_TYPE | application/x-www-form-urlencoded; Charset=UTF-8 |
| HTTP_CONNECTION | Keep-Alive |
| PATH_INFO | |
| HTTP_HOST | hg458.cn |
| REDIRECT_STATUS | 200 |
| SERVER_NAME | hg458.cn |
| SERVER_PORT | 443 |
| SERVER_ADDR | 172.20.135.126 |
| REMOTE_PORT | 62394 |
| REMOTE_ADDR | 122.10.78.118 |
| SERVER_SOFTWARE | nginx/1.26.3 |
| GATEWAY_INTERFACE | CGI/1.1 |
| HTTPS | on |
| REQUEST_SCHEME | https |
| SERVER_PROTOCOL | HTTP/1.1 |
| DOCUMENT_ROOT | /www/wwwroot/hg458.cn/public |
| DOCUMENT_URI | /index.php |
| REQUEST_URI | /news-3.html |
| SCRIPT_NAME | /index.php |
| CONTENT_LENGTH | |
| CONTENT_TYPE | application/x-www-form-urlencoded; Charset=UTF-8 |
| REQUEST_METHOD | GET |
| QUERY_STRING | s=/news-3.html |
| SCRIPT_FILENAME | /www/wwwroot/hg458.cn/public/index.php |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /index.php |
| REQUEST_TIME_FLOAT | 1762217889.9029 |
| REQUEST_TIME | 1762217889 |