日期:2014-05-16  浏览次数:20417 次

求大神帮忙,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这个类吧