* @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')) {
/**
* 快速获取容器中的实例 支持依赖注入
* @param string $name 类名或标识 默认获取当前应用实例
* @param array $args 参数
USER | nobody |
HOME | / |
HTTP_HOST | www.omforum.cn |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
REDIRECT_STATUS | 200 |
SERVER_NAME | wh-nxfz655k67gd9p6thfb.my3w.com |
SERVER_PORT | 80 |
SERVER_ADDR | 172.19.6.91 |
REMOTE_PORT | 51994 |
REMOTE_ADDR | 3.231.3.140 |
SERVER_SOFTWARE | nginx/1.18.0 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /data/user/htdocs/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /portal/Article/index.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//portal/Article/index.html |
PATH_INFO | |
SCRIPT_FILENAME | /data/user/htdocs/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711696747.4185 |
REQUEST_TIME | 1711696747 |