Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Load library with an alias in MY_Controller ?
#1

[eluser]DjLeChuck[/eluser]
EDIT :
I'm so stupid...
I have a controller already named Utilisateur, so there is a conflict... --'

Hi,

I have a problem I don't understand.

MY_Controller exteds CI_Controller
Utilisateur is a custom library

If I do :
Code:
<?php
// Load the library
$this->load->library('utilisateur');

// Launch a method
$this->utilisateur->estAutorise();
?>
PHP return Call to a member function estAutorise() on a non-object

Now, if I do :
Code:
<?php
// Load the library
$this->load->library('utilisateur', null, 'user');

// Launch a method
$this->user->estAutorise();
?>
It works...

What's wrong ?


Messages In This Thread
[SOLVED] Load library with an alias in MY_Controller ? - by El Forum - 05-23-2011, 07:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB