$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) {
6JOd55u!5Zyo57q@_html |
PHPSESSID | b277a4a8d71516c267232debf5544354 |
USER | www |
HOME | /home/www |
SCRIPT_NAME | /index.php |
REQUEST_URI | /6JOd55u!5Zyo57q@.html |
QUERY_STRING | 6JOd55u!5Zyo57q@.html |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_QUERY_STRING | 6JOd55u!5Zyo57q@.html |
REDIRECT_URL | /6JOd55u!5Zyo57q@.html |
REMOTE_PORT | 41694 |
SCRIPT_FILENAME | /www/wwwroot/www/117.50.120.41/public/index.php |
SERVER_ADMIN | webmaster@example.com |
CONTEXT_DOCUMENT_ROOT | /www/wwwroot/www/117.50.120.41/public |
CONTEXT_PREFIX | |
REQUEST_SCHEME | http |
DOCUMENT_ROOT | /www/wwwroot/www/117.50.120.41/public |
REMOTE_ADDR | 45.38.154.98 |
SERVER_PORT | 80 |
SERVER_ADDR | 10.61.184.243 |
SERVER_NAME | www.fsgykg.com |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | Apache Server at www.fsgykg.com Port 80 |
LD_LIBRARY_PATH | /www/server/apache/lib |
PATH | /sbin:/usr/sbin:/bin:/usr/bin |
HTTP_COOKIE | PHPSESSID=b277a4a8d71516c267232debf5544354 |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_ACCEPT | */* |
HTTP_HOST | www.fsgykg.com |
HTTP_USER_AGENT | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36 |
proxy-nokeepalive | 1 |
REDIRECT_STATUS | 200 |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1713769476.0816 |
REQUEST_TIME | 1713769476 |