您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

求大神帮忙,CI访问restful有关问题

2024/3/3 19:31:37发布20次查看
求大神帮忙,ci访问restful问题
ci访问restful服务,服务是c#写的,返回的数据格式为json
接口:memberservice。方法login(int a,string b,string c)
我在网上找了些资料,参考上面写了结果报错。
我的代码如下:
$this->load->library('rest',array('server'=>'http://localhost/teamloggingwebhost/memberservice.svc/','http_auto'=>'basic'));
$param=array('a'=>1,'b=>'hh','c'=>'kk');
$result=$this->rest->get('login',$param,'application/json');

调试后报错
unable to load the requsted class: rest
这是不是要引用rest的类库。ci框架里面带有rest的类库吗?
------解决方案--------------------
你的application/libraries或者system/libraries下没定义rest这个类吧
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product