CodeIgniter Forums
cannot load model in CI 1.72 using modular extention - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: cannot load model in CI 1.72 using modular extention (/showthread.php?tid=26586)

Pages: 1 2


cannot load model in CI 1.72 using modular extention - El Forum - 01-18-2010

[eluser]didit[/eluser]
no, i don't

because actually i dont know how to enable / set 'autoloading' database,
i dont change anything in the system except for db connection for Mysql above


cannot load model in CI 1.72 using modular extention - El Forum - 01-18-2010

[eluser]flaky[/eluser]
in the same folder where database.php is placed, there is autoload.php
find this part and modify it this.
Code:
/*
| -------------------------------------------------------------------
|  Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in the system/libraries folder
| or in your system/application/libraries folder.
|
| Prototype:
|
|    $autoload['libraries'] = array('database', 'session', 'xmlrpc');
*/

$autoload['libraries'] = array('database');

then remove
Code:
$this->load->database();
from the constructor


cannot load model in CI 1.72 using modular extention - El Forum - 01-18-2010

[eluser]didit[/eluser]
wow it's work!

thanks a lot flaky Big Grin,


cannot load model in CI 1.72 using modular extention - El Forum - 01-18-2010

[eluser]flaky[/eluser]
no problem
glad I could help :-)