1. 在配置文件 config.php中定义:
'DB_PREFIX'=>'tp_',
'DB_DSN'=>'mysql://root:@localhost:3306/xueji',
2. 在Admin/Lib/Action/IndexAction.class.php下:
$stu=M('Student');
dump($stu->select());
结果很悲剧,死活打印boolean false
后来在主入口文件:Admin.php加入:
define('APP_DEBUG', true);
问题尽然奇迹般解决了!!
最佳答案