nikolatesfei 发表于 2015-12-10 20:33:08

添加RESTful为什么不能在autoload中添加

$autoload['libraries'] = array('REST_Controller');
defined('BASEPATH') OR exit('No direct script access allowed');

class Rest_server extends REST_Controller {

        function __construct(){
                parent::__construct();
        }

    public function index()
    {
      $this->set_response(array('id'=>1,"name"=>"test"), REST_Controller::HTTP_OK);
    }
}

这样添加无效 无法找到REST_Controller说明没有加载到 这是为什么啊??
页: [1]
查看完整版本: 添加RESTful为什么不能在autoload中添加