1 header("Access-Control-Allow-Origin: *");
2 header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
3 header('Access-Control-Allow-Headers:x-requested-with,content-type');

话不多说 直接上代码  

注意 * 表示外部访问无限制

posted on 2020-08-15 14:34  思君邪  阅读(188)  评论(0编辑  收藏  举报