Welcome Guest, Not a member yet? Register   Sign In
User's library can't use the __construct method passing parameters???
#2

Hi, leon hou, and welcome to CodeIgniter and the forums! Smile

What you are doing is ok, but when you load the library, you must pass the argument at that time. It's missing one parameter probably because you are not sending it. When you load the library, you must use something like
$this->load->library('test', $arguments);

Check out these pages.
https://www.codeigniter.com/user_guide/g...aries.html
http://stackoverflow.com/questions/12953...odeigniter
http://stackoverflow.com/questions/34806...er-library
http://stackoverflow.com/questions/10655...odeigniter

I hope that helps!
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
Reply


Messages In This Thread
RE: User's library can't use the __construct method passing parameters??? - by RobertSF - 03-10-2016, 10:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB