Unknown How to Load Library | Model | Helper in Codeigniter | Autoload files | Codeigniter tutorial for beginners step by step in hindi | My Project HD
X

How to Load Library | Model | Helper in Codeigniter | Autoload files | Codeigniter tutorial for beginners step by step in hindi

How to Load Library | Model | Helper in Codeigniter | Autoload files | Codeigniter tutorial for beginners step by step in hindi





In this tutoral we will Discuss how to load model,library and helper in codeigniter .There are 2 ways to load library, helper and model in codeigniter

How To Load Library in codeigniter

autoload.php file 

The library key of the config array is used to load the library in the autoload.php

$autoload['libraries'] = array('library_name');

Current controller constructr :

public function __construct()
{
    parent::__construct();
    $this->load->libraries('library_name');
}

 

 

How To Load helper in codeigniter :

autoload.php file

The helper key of the config array is used to load the helper in the autoload.php

$autoload['helper'] = array('helper_name');

Current controller constructr :

public function __construct()
{
    parent::__construct();
    $this->load->model('helper_name');
}

 

How To Load Model in codeigniter

autoload.php file

The model key of the config array is used to load the model in the autoload.php

$autoload['model'] = array('model_name');

Current controller constructr :

public function __construct()
{
    parent::__construct();
    $this->load->model('model_name');
}

 

More Tutorials

Web Technology Tutorials in Hindi

Web Technology Tutorials in Hindi

Read More
Diploma engineering tutorial for polytechnic collage

Diploma Engineering Tutorial

Read More
Final Year Projects for Computer Science with Source Code

Final Year Projects for Computer Science with Source Code

Read More

Related Tutorials