封装一个PHP 判断是否是GET请求函数
/** * 判断是否为GET请求 * @return bool */ function is_get() { $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ""; return strtoupper($method) == "GET" ? true : false; }
封装一个PHP 判断是否是GET请求函数
/** * 判断是否为GET请求 * @return bool */ function is_get() { $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ""; return strtoupper($method) == "GET" ? true : false; }