1. $_SERVER['HTTP_ACCEPT'] 返回来自当前请求的请求头。
场景,校验提交的数据前,看是不是 post请求
if ($_SERVER["REQUEST_METHOD"] == "POST") {
echo "请求方式是post"
}