* @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_HOST | www.yoyi.com.cn |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.yoyi.com.cn |
SERVER_PORT | 80 |
SERVER_ADDR | 10.2.32.185 |
REMOTE_PORT | 57423 |
REMOTE_ADDR | 10.2.0.18 |
SERVER_SOFTWARE | nginx/1.22.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /data/html/www.yoyi.com.cn |
DOCUMENT_URI | /index.php |
REQUEST_URI | /about-us/staff/2014/0513/492.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/about-us/staff/2014/0513/492.html |
SCRIPT_FILENAME | /data/html/www.yoyi.com.cn/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711570.2383 |
REQUEST_TIME | 1711711570 |
UX_ADMIN_URL | @growthman1688 |
ROOT_PATH | /data/html/www.yoyi.com.cn/ |
APP_PATH | /data/html/www.yoyi.com.cn/application/ |
DS | / |
ADDON_PATH | /data/html/www.yoyi.com.cn/addons/ |
ROOT_URL | / |
TEMPLATE_PATH | /data/html/www.yoyi.com.cn/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 |