* @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<T> $name 类名或标识 默认获取当前应用实例
$Version | 1 |
PHPSESSID | 7994928f46a09f1782e0b9614cf83b63 |
$Path | / |
last_time | 1707235257 |
TEMP | /tmp |
TMPDIR | /tmp |
TMP | /tmp |
PATH | /usr/local/bin:/usr/bin:/bin |
USER | www |
HOME | /home/www |
HTTP_ACCEPT_ENCODING | gzip, identity;q=0.9 |
HTTP_ACCEPT_LANGUAGE | en, * |
HTTP_ACCEPT | text/html,image/png,image/jpeg,image/pjpeg,image/x-xbitmap,image/svg+xml,image/gif;q=0.9,*/*;q=0.1 |
HTTP_USER_AGENT | Mozilla/4.5 (compatible; 3.0x; Windows 98) |
HTTP_COOKIE | $Version=1; PHPSESSID=7994928f46a09f1782e0b9614cf83b63; $Path=/ |
HTTP_REFERER | http://www.igupu.com/client/32.html?t_id= |
HTTP_CONNECTION | close |
HTTP_X_FORWARDED_FOR | 38.207.248.66 |
HTTP_HOST | www.igupu.com |
PATH_INFO | /news/48/32.html |
REDIRECT_STATUS | 200 |
SERVER_NAME | 192.168.10.173 |
SERVER_PORT | 8080 |
SERVER_ADDR | 192.168.10.173 |
REMOTE_PORT | 64938 |
REMOTE_ADDR | 192.168.10.115 |
SERVER_PROTOCOL | HTTP/1.0 |
DOCUMENT_ROOT | /data/httpd/kaihenggw/public |
DOCUMENT_URI | /index.php/news/48/32.html |
REQUEST_URI | /news/48/32.html |
SCRIPT_NAME | /index.php |
SCRIPT_FILENAME | /data/httpd/kaihenggw/public/index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | |
SERVER_SOFTWARE | nginx |
GATEWAY_INTERFACE | CGI/1.1 |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php/news/48/32.html |
REQUEST_TIME_FLOAT | 1707235257.1651 |
REQUEST_TIME | 1707235257 |