* @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 参数
id | 235 |
cid | 28 |
USER | www |
HOME | /home/www |
SCRIPT_NAME | /index.php |
REQUEST_URI | /portal/product/index.html?id=235&cid=28 |
QUERY_STRING | s=portal/product/index.html&id=235&cid=28 |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_QUERY_STRING | s=portal/product/index.html&id=235&cid=28 |
REDIRECT_URL | /portal/product/index.html |
REMOTE_PORT | 60678 |
SCRIPT_FILENAME | /www/wwwroot/qzctq.com/public/index.php |
SERVER_ADMIN | webmaster@example.com |
CONTEXT_DOCUMENT_ROOT | /www/wwwroot/qzctq.com/public |
CONTEXT_PREFIX | |
REQUEST_SCHEME | http |
DOCUMENT_ROOT | /www/wwwroot/qzctq.com/public |
REMOTE_ADDR | 44.200.230.43 |
SERVER_PORT | 80 |
SERVER_ADDR | 172.17.0.15 |
SERVER_NAME | qzctq.com |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | <address>Apache Server at qzctq.com Port 80</address> |
LD_LIBRARY_PATH | /www/server/apache/lib |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin |
HTTP_HOST | qzctq.com |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
proxy-nokeepalive | 1 |
REDIRECT_STATUS | 200 |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711656026.6464 |
REQUEST_TIME | 1711656026 |