* @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 调用参数 支持字符串和数组
PHPSESSID | 2s05dfhu41reenolgoi3c79tgd |
think_var | en-us |
USER | www |
HOME | /home/www |
HTTP_COOKIE | PHPSESSID=2s05dfhu41reenolgoi3c79tgd; think_var=en-us |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_ACCEPT | */* |
HTTP_HOST | www.wujunsolar.com |
HTTP_USER_AGENT | CCBot/2.0 (https://commoncrawl.org/faq/) |
PATH_INFO | /index.php |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.wujunsolar.com |
SERVER_PORT | 443 |
SERVER_ADDR | 172.25.42.13 |
REMOTE_PORT | 39538 |
REMOTE_ADDR | 170.130.200.186 |
SERVER_SOFTWARE | nginx/1.20.2 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/www.wujunsolar.com/public |
DOCUMENT_URI | /index.php/ |
REQUEST_URI | /index.php/ |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | |
SCRIPT_FILENAME | /www/wwwroot/www.wujunsolar.com/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php/index.php |
REQUEST_TIME_FLOAT | 1733250777.4701 |
REQUEST_TIME | 1733250777 |
IF_PUBLIC | true |
ROOT_PATH | /www/wwwroot/www.wujunsolar.com/public/../ |
APP_PATH | /www/wwwroot/www.wujunsolar.com/public/../application/ |
ADDON_PATH | /www/wwwroot/www.wujunsolar.com/public/../addons/ |
ROOT_URL | / |
TEMPLATE_PATH | /www/wwwroot/www.wujunsolar.com/public/../public/templates/ |
PINYIN_DEFAULT | 4096 |
PINYIN_TONE | 2 |
PINYIN_NO_TONE | 4 |
PINYIN_ASCII_TONE | 8 |
PINYIN_NAME | 16 |
PINYIN_KEEP_NUMBER | 32 |
PINYIN_KEEP_ENGLISH | 64 |
PINYIN_UMLAUT_V | 128 |
PINYIN_KEEP_PUNCTUATION | 256 |