|
发表于 2013-1-4 16:26:39
|
显示全部楼层
修改配置文件中的autoload.php文件,
Check if this is set to true in your databaseconfig file. As far as I know db->get is an active record thing, soit needs to be set to use it.
$db['default']['active_r'] = TRUE;
You can also auto load the db for each page by setting it in the autoload.php
/*
| -------------------------------------------------------------------
| 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') |
|