if(""==$_SERVER['HTTP_REFERER']){ echo '{"status":"非法请求!"}'; exit(); } 转载于:https://www.cnblogs.com/linyusong/p/8085026.html