简体   繁体   中英

codeigniter helper function did not loaded

I try to "rebuild" again my web project in Codeigniter, but I totally forgot how to setting it.. In the last 3 years, this website contains no error and all works great. but when I try to reopen again, it contains errors like this :

Fatal error: Call to undefined function admin_info() in C:\\xampp\\htdocs\\misnews\\application\\controllers\\home.php on line 27

PS : the admin_info() functions are inside the helper, and I loaded it in autoload and added $this->load->helper('basic_helper); in the home controller

Can you help me? Thanks

If your helper is named basic_helper.php

application / helpers / basic_helper.php

Then all you should need to do is $this->load->helper('basic');

You can also autoload helper in

application / config / autoload.php

When you need to use helper $this->basic->some_function();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM