机场的船 发表于 2015-12-30 21:02:36

CI跨域访问

先说明小白一枚,写了一个接口,调用的时候出现了错误XMLHttpRequest cannot load http://192.168.1.235/**/**/**. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.1.111:3001' is therefore not allowed access.然后百度在<?php下面写了这个 header("Access-Control-Allow-Origin:*");,不行。之后又写了这个$this->output->set_header('Access-Control-Allow-Origin:*');还是不行。使用flash,iOS程序调用都是好的,但是用白鹭就这个问题了。使用的本地服务器。

机场的船 发表于 2015-12-31 11:17:05

没有人啊!!!真可怜

机场的船 发表于 2015-12-31 11:17:48

有没有人来帮帮小兄弟啊

chrisheng 发表于 2016-1-2 01:03:45

为啥要跨域呢?没做过游戏了解不多
页: [1]
查看完整版本: CI跨域访问