Question:
I'm starting with CodeIgniter, I'm using version 2.2, and I'm having problems using the anchor
function.
The following error occurs:
Fatal error: Call to undefined function anchor()
I don't know if the reason is the version or something, if anyone can help me or talk about another function that I can use with the same result, I appreciate it.
Answer:
Check the autoload.php
file in the config
folder or on your controller
and put the following function:
<?php
function __construct(){
parent::__construct();
$this->load->helper('url');
}
?>