Hi everyone I am new to a PHP framework codeIgniter, I am going over the user guide iv ran in to a problem, I am on the part where you load helper file but for some reason my code just in not working I keep getting this error:
Fatal error: Call to undefined function anchor() in /home/fresherd/public_html/CI/system/application/views/blogview.php on line 17
now im not 100% sure that it is loading the helper file this could be causing the but I am not sure how to detect the file has been loaded
any advice will help many thanks, Alan
If you are not sure please check the autoload.php file in the config folder or in your controller put the following function:
<?php
function __construct(){
parent::__construct();
$this->load->helper('url');
}
?>
Just add url in helper inside autoload.php inside config folder.
$autoload['helper'] = array('url');
or you can add this inside your function
$this->load->helper('url');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With