CodeIgniter Forums

Full Version: Rest Controller Error, Not Sure How To Troubleshoot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Of course at this point, I created an account, searched through the forum for some possible insight, but I tried implementing Chrisk Acer Guis CodeIgniter Rest Server {https://github.com/chriskacerguis/codeigniter-restserver} and I encountered a problem when trying to access a particular controller.

Error::

Fatal error: Class 'REST_Controller' not found in /var/www/html/my_website_here/application/controllers/admin/Pages.php on line 5

Pages Class::


Code:
<?php defined('BASEPATH') OR exit('NO direct script access allowed');

require APPPATH.'/libraries/REST_Controller.php';

class Pages extends REST_Controller {

   function __construct() {

      parent::__construct();
   }

   function page_get() {

      // Test Only
   }

}



I tried Google and there's no real steps to trouble shoot here. I'm not sure if there's a conflict somewhere, I'm using CodeIgniter 3.
Try:
PHP Code:
require APPPATH.'libraries/REST_Controller.php'
It should be require_once the docs say.
Troubleshooting: Take the source before this commit: https://github.com/chriskacerguis/codeig...3a2a1a41a3