How you will use or add codeigniter libraries?
How you will use or add codeigniter libraries?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
You can try this
The file Message.php in application/libraries:
class Message{
function display_message()
{
return 'Welcome to my Dashboard';
}
}
Controller dashboard.php in application/controllers
class Dashboard extends CI_Controller
{
function index()
{
$this->load->library('message');
echo $this->message->display_message();
}
}