Just add these to your .php file and it should do the trick:
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: 'X-Requested-With,content-type'");
header("Access-Control-Allow-Methods: 'GET, POST, OPTIONS, PUT, PATCH, DELETE'");
Or you could use a Chrome plugin like 'Moesif Origin & CORS Changer'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…