A PHP Error was encountered

Severity: Warning

Message: preg_match(): Compilation failed: unmatched closing parenthesis at offset 38

Filename: hooks/Check_user.php

Line Number: 217

Backtrace:

File: /home/b2z283hyjn3q/public_html/application/hooks/Check_user.php
Line: 217
Function: preg_match

File: /home/b2z283hyjn3q/public_html/application/hooks/Check_user.php
Line: 84
Function: getOS

File: /home/b2z283hyjn3q/public_html/application/hooks/Check_user.php
Line: 10
Function: anylisis

File: /home/b2z283hyjn3q/public_html/index.php
Line: 315
Function: require_once

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');
}

 


Related Tutorials