* @param integer|Response $code 状态码 或者 Response对象实例
* @param string $message 错误信息
* @param array $header 参数
*/
function abort($code, string $message = '', array $header = [])
{
if ($code instanceof Response) {
throw new HttpResponseException($code);
} else {
throw new HttpException($code, $message, null, $header);
}
}
}
if (!function_exists('app')) {
/**
* 快速获取容器中的实例 支持依赖注入
* @template T
* @param string|class-string
$name 类名或标识 默认获取当前应用实例
id | 81 |
PHPSESSID | 9c9afa496bd2ee6cc78eead338668031 |
last_time | 1751351933 |
USER | www |
HOME | /home/www |
HTTP_COOKIE | PHPSESSID=9c9afa496bd2ee6cc78eead338668031 |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
HTTP_CONNECTION | close |
HTTP_REMOTE_HOST | 107.158.255.18 |
HTTP_X_FORWARDED_FOR | 107.158.255.18 |
HTTP_X_REAL_IP | 107.158.255.18 |
HTTP_HOST | s.raybiotech.cn |
PATH_INFO | /portal/page/index.html |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.raybio.cn |
SERVER_PORT | 443 |
SERVER_ADDR | 172.19.46.108 |
REMOTE_PORT | 47702 |
REMOTE_ADDR | 121.89.232.252 |
SERVER_SOFTWARE | nginx/1.18.0 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/1.0 |
DOCUMENT_ROOT | /www/wwwroot/s.raybiotech.cn/thinkcmf6/public |
DOCUMENT_URI | /index.php/portal/page/index.html |
REQUEST_URI | /index.php/portal/page/index.html?id=81 |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | id=81 |
SCRIPT_FILENAME | /www/wwwroot/s.raybiotech.cn/thinkcmf6/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php/portal/page/index.html |
REQUEST_TIME_FLOAT | 1751351933.8086 |
REQUEST_TIME | 1751351933 |