User's library can't use the __construct method passing parameters??? |
Hi, leon hou, and welcome to CodeIgniter and the forums!
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!
|
Messages In This Thread |
User's library can't use the __construct method passing parameters??? - by leonhou - 03-10-2016, 06:16 PM
RE: User's library can't use the __construct method passing parameters??? - by RobertSF - 03-10-2016, 10:33 PM
RE: User's library can't use the __construct method passing parameters??? - by leonhou - 03-17-2016, 01:54 AM
|