* @param integer|Response $code 状态码 或者 Response对象实例
* @param string $message 错误信息
* @param array $header 参数
*/
function abort($code, $message = null, $header = [])
{
if ($code instanceof Response) {
throw new HttpResponseException($code);
} else {
throw new HttpException($code, $message, null, $header);
}
}
}
if (!function_exists('action')) {
/**
* 调用模块的操作方法 参数格式 [模块/控制器/]操作
* @param string $url 调用地址
* @param string|array $vars 调用参数 支持字符串和数组
USER | www |
HOME | /home/www |
HTTP_X_MICROSOFTAJAX | Delta=true |
HTTP_USER_AGENT | Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) |
HTTP_CONTENT_TYPE | application/x-www-form-urlencoded; charset=utf-8 |
HTTP_CACHE_CONTROL | no-cache |
HTTP_ACCEPT_LANGUAGE | en-US,en;q=0.5 |
HTTP_ACCEPT_ENCODING | gzip, deflate |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
HTTP_X_APPLE_STORE_FRONT | 143444,12 |
HTTP_X_APPLE_TZ | 0 |
HTTP_REFERER | https://www.baidu.com/search/spider.htm |
HTTP_HOST | 5iyixue.com |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | jinhuzs.cn |
SERVER_PORT | 80 |
SERVER_ADDR | 103.47.82.200 |
REMOTE_PORT | 35020 |
REMOTE_ADDR | 104.243.143.170 |
SERVER_SOFTWARE | nginx/1.16.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/jinhuzscn/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /article/show/35.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | application/x-www-form-urlencoded; charset=utf-8 |
REQUEST_METHOD | GET |
QUERY_STRING | s=/article/show/35.html |
SCRIPT_FILENAME | /www/wwwroot/jinhuzscn/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1738106176.436 |
REQUEST_TIME | 1738106176 |
DS | / |
ROOT_PATH | /www/wwwroot/jinhuzscn/ |
APP_PATH | /www/wwwroot/jinhuzscn/app/ |
WWW_ROOT | /www/wwwroot/jinhuzscn/public/ |
WOO_PATH | /www/wwwroot/jinhuzscn/woo/ |
ADDONS_PATH | /www/wwwroot/jinhuzscn/addons/ |
APP_CACHE_DIR | /www/wwwroot/jinhuzscn/data/cache/ |
SMARTY_DIR | /www/wwwroot/jinhuzscn/include/smarty-3.1.27/libs/ |
SMARTY_SYSPLUGINS_DIR | /www/wwwroot/jinhuzscn/include/smarty-3.1.27/libs/sysplugins/ |
SMARTY_PLUGINS_DIR | /www/wwwroot/jinhuzscn/include/smarty-3.1.27/libs/plugins/ |
SMARTY_MBSTRING | true |
SMARTY_RESOURCE_CHAR_SET | UTF-8 |
SMARTY_RESOURCE_DATE_FORMAT | %b %e, %Y |
SMARTY_SPL_AUTOLOAD | 0 |