• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[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 ?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.