• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
load helpers and libraries version difference

Hi all,

I developed in codeigniter a while back and am starting a new project. I downloaded the new version and already having trouble with the changes. I'm sure they're subtle i just can't seem to get a few things working. For example, i would like to load helpers, libraries, and the database, in the parent::Controller();. This is what did work on the old version

class Register extends Controller {

    function Register()
        $this->load->helper(array('form', 'url'));

and know "Controller" has now become "CI_Controller" and have also noticed on the "welcome" controller codeigniter comes with uses "public function index()" instead of just "function index()".

How the heck do you load your helpers and libraries at the start to use in all your controller functions?

class Register extends CI_Controller {

    public function __construct()
        // etc



love you

Also all Models need to be changed to CI_Model

Excellent place to check for upgrading issues and info is userguide - upgrading

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.