用户
 找回密码
 入住 CI 中国社区
搜索
查看: 890|回复: 0
收起左侧

[版本 3.x] 添加RESTful为什么不能在autoload中添加

[复制链接]
发表于 2015-12-10 20:33:08 | 显示全部楼层 |阅读模式
  1. $autoload['libraries'] = array('REST_Controller');
复制代码
  1. defined('BASEPATH') OR exit('No direct script access allowed');

  2. class Rest_server extends REST_Controller {

  3.         function __construct(){
  4.                 parent::__construct();
  5.         }

  6.     public function index()
  7.     {
  8.         $this->set_response(array('id'=>1,"name"=>"test"), REST_Controller::HTTP_OK);
  9.     }
  10. }
复制代码

这样添加无效 无法找到REST_Controller  说明没有加载到 这是为什么啊??

本版积分规则