PHP解决跨域访问的问题
在控制器的第一行放如下代码即可解决
header('Access-Control-Allow-Origin: http://ding.taozugong.com'); header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS'); header('Access-Control-Allow-Headers: token, Content-Type'); header('Access-Control-Allow-Credentials: true');