autoload not working correctly |
Welcome. I think I had found a bug in autoload. In the configuration I had added to autoload all needed libs (like by example "html", "url" with I needed).
After I wrote the code, I recieved error about call to unknown functions (with I got from the documentation for the html and url helpers). I solved it by typing on the code top: Code: $this->load->helper('html'); This would mean that the autoloader don't work because before I entered the above code, the libs weren't automacially loaded as they should be.
Thank you for your report. I tested it and autoload works for me.
Try to test it for yourself with clean installation of the latest version of CodeIgniter. It should work fine.
As evident by your $this->load->helper() calls, 'url' and 'html' are helpers and not libraries ... you can't load them as "libraries".
(09-29-2015, 11:35 AM)mcgiwer Wrote: Welcome. I think I had found a bug in autoload. In the configuration I had added to autoload all needed libs (like by example "html", "url" with I needed). Hi, I would just like to clarify where did you put the codes (e.g. $this->load->helper('html') ...). You have mentioned, In the configuration I had added to autoload all needed libs (like by example "html", "url" with I needed). I assumed you are writing the loading codes to some other file not controller nor model. If that's the case, you cannot really call $this->load->helper since $this is not referenced to any object specifically to CI singleton instance. (e.g. $CI =& get_instance()) Please consider the link for more info. http://tosbourn.com/codeigniter-use-get_instance/ You can find these statements below. Quote:If however you are writing your own custom libraries or something that sits outside of the MVC files then you do need to use it. I hope these have sense. Thank you. - joseph.dicdican ![]()
Joseph K. Dicdican
Softshore Global Solutions Inc. | Junior Web Developer Intern Passerelles numériques Philippines | Scholar [email protected] |
Welcome Guest, Not a member yet? Register Sign In |