ShowRuntimeBehavior有错误 。

浏览:366 发布日期:2014/04/21 分类:求助交流
        if(C('SHOW_DB_TIMES') && class_exists('Db',false) ) {
            // 显示数据库操作次数
            $showTime .= ' | DB :'.N('db_query').' queries '.N('db_write').' writes ';
        }
        if(C('SHOW_CACHE_TIMES') && class_exists('Cache',false)) {
            // 显示缓存读写次数
            $showTime .= ' | Cache :'.N('cache_read').' gets '.N('cache_write').' writes ';
        }
其中的 class_exists('Cache',false) ,这句没有作用 ,改为 class_exists('\Think\\Cache',false) 后是正常的 。
命名空间真麻烦 ,建议将框架的这地方都查一下。
最佳答案
评论( 相关
后面还有条评论,点击查看>>