ThinkPHP 跨域问题

轻松解决跨域问题!

if($_SERVER['REQUEST_METHOD'] == 'OPTIONS'){
    header('Access-Control-Allow-Origin: *');
    header("Access-Control-Allow-Headers:*");
    header('Access-Control-Allow-Methods: *');
    exit;
}

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

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注