$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) {
USER | www |
HOME | /home/www |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | zgbiotech.com |
PATH_INFO | /%25e8%2587%25bb%25e6%25a0%25bc%25e6%259c%258d%25e5%258a%25a1/%25e5%259f%25b9%25e5%2585%25bb%25e5%259f%25ba-2/%25e5%259f%25b9%25e5%2585%25bb%25e5%259f%25ba%25e5%2595%2586%25e4%25b8%259a%25e5%258c%2596%25e7%2594%259f%25e4%25ba%25a7/index.php |
REDIRECT_STATUS | 200 |
SERVER_NAME | zgbiotech.com |
SERVER_PORT | 443 |
SERVER_ADDR | 172.16.1.130 |
REMOTE_PORT | 45866 |
REMOTE_ADDR | 44.200.169.91 |
SERVER_SOFTWARE | nginx/1.20.2 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /www/wwwroot/zgbiotech.com/public |
DOCUMENT_URI | /index.php/%e8%87%bb%e6%a0%bc%e6%9c%8d%e5%8a%a1/%e5%9f%b9%e5%85%bb%e5%9f%ba-2/%e5%9f%b9%e5%85%bb%e5%9f%ba%e5%95%86%e4%b8%9a%e5%8c%96%e7%94%9f%e4%ba%a7/ |
REQUEST_URI | /index.php/%25e8%2587%25bb%25e6%25a0%25bc%25e6%259c%258d%25e5%258a%25a1/%25e5%259f%25b9%25e5%2585%25bb%25e5%259f%25ba-2/%25e5%259f%25b9%25e5%2585%25bb%25e5%259f%25ba%25e5%2595%2586%25e4%25b8%259a%25e5%258c%2596%25e7%2594%259f%25e4%25ba%25a7/ |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | |
SCRIPT_FILENAME | /www/wwwroot/zgbiotech.com/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php/%25e8%2587%25bb%25e6%25a0%25bc%25e6%259c%258d%25e5%258a%25a1/%25e5%259f%25b9%25e5%2585%25bb%25e5%259f%25ba-2/%25e5%259f%25b9%25e5%2585%25bb%25e5%259f%25ba%25e5%2595%2586%25e4%25b8%259a%25e5%258c%2596%25e7%2594%259f%25e4%25ba%25a7/index.php |
REQUEST_TIME_FLOAT | 1711645075.9241 |
REQUEST_TIME | 1711645075 |