$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) {
/item-17_html |
REDIRECT_STATUS | 200 |
HTTP_USER_AGENT | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.43 |
HTTP_X_REAL_IP | 39.146.182.192 |
HTTP_HOST | www.yekemall.com |
HTTP_ACCEPT | */* |
HTTP_ACCEPT_ENCODING | gzip, deflate |
HTTP_REFERER | https://www.yekemall.com/item-17.html |
HTTP_CONNECTION | upgrade |
HTTP_X_FORWARDED_FOR | 39.146.182.192 |
PATH | C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Redis\;D:\ServerRoot\php8126;D:\ServerRoot\php8126\ext; |
SystemRoot | C:\Windows |
COMSPEC | C:\Windows\system32\cmd.exe |
PATHEXT | .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC |
WINDIR | C:\Windows |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache/2.4.58 (Win64) PHP/8.1.26 |
SERVER_NAME | www.yekemall.com |
SERVER_ADDR | 10.0.20.211 |
SERVER_PORT | 80 |
REMOTE_ADDR | 10.0.20.161 |
DOCUMENT_ROOT | D:/www/incon/incon/public |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | D:/www/incon/incon/public |
SERVER_ADMIN | 75628377@qq.com |
SCRIPT_FILENAME | D:/www/incon/incon/public/index.php |
REMOTE_PORT | 56916 |
REDIRECT_URL | /item-17.html |
REDIRECT_QUERY_STRING | /item-17.html |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | /item-17.html |
REQUEST_URI | /item-17.html |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1746534114.0294 |
REQUEST_TIME | 1746534114 |