tp5允许跨域

header("Access-Control-Allow-Origin: *");

放在命名空间之后

原文地址:https://www.cnblogs.com/xiaobiaomei/p/9603459.html