Welcome Guest, Not a member yet? Register   Sign In
Error:Call to undefined method
#1

[eluser]ChristopherDosin[/eluser]
hey guys,

i`m new at php and codeigniter. i`ve a question.
i get this error message.

Code:
Fatal error: Call to undefined method CI_Loader::libary() in D:\xampp\htdocs\chris\application\controllers\login.php on line 36

line 36 in my php file:

Code:
function create_member()
    {
        $this->load->libary('form_validation');
........

in my autoload.php i`ve loaded the form_validation libary
Code:
$autoload['libraries'] = array('database', 'session', 'form_validation');

so whats the error because i`ve loaded the form_validation libary or?
#2

[eluser]ChristopherDosin[/eluser]
my fault.

library not libary Smile
#3

[eluser]BrianDHall[/eluser]
Don't you hate those one-letter errors? LOL

One other thing though, don't double-load, it only causes big problems that are hard to find. If something is autoloaded, don't use $this->load on it again. Pick one or the other for any given library.

So if you autoload form_validation, remove that line from the create_member function. It might not cause an error now, but it can be a real pain with some libraries.
#4

[eluser]ChristopherDosin[/eluser]
yes this one letter errors sucks Big Grin

okay thanks i`ll remove it from the audoload.php
#5

[eluser]saidai jagan[/eluser]
[quote author="BrianDHall" date="1261444330"]
One other thing though, don't double-load, it only causes big problems that are hard to find. If something is autoloaded, don't use $this->load on it again.
So if you autoload form_validation, remove that line from the create_member function. It might not cause an error now, but it can be a real pain with some libraries.[/quote]

Thanks, BrianDHall Some times i suppose to do it :red:




Theme © iAndrew 2016 - Forum software by © MyBB