yii 使用mongodb扩展的问题

匿名程序员 2014-05-28 10:53:48
mian.php 里配置好
'import'=>array(
'application.models.*',
'application.components.*',
'application.helpers.*',
'ext.YiiMongoDbSuite.*',//添加mongodb扩展
),
'components'=>array(
....
'mongodb' => array(
'class' => 'EMongoDB',
'connectionString' => 'mongodb://127.0.0.1:27017',
'dbName' => 'xiaoao',
'fsyncFlag' => true,
'safeFlag' => true,
'useCursor' => false
),
),

运行时候出来
include(Mongo.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory


E:\young\xiaoao\framework\YiiBase.php(427)

415 {
416 include($classFile);
417 if(YII_DEBUG && basename(realpath($classFile))!==$className.'.php')
418 throw new CException(Yii::t('yii','Class name "{class}" does not match class file "{file}".', array(
419 '{class}'=>$className,
420 '{file}'=>$classFile,
421 )));
422 break;
423 }
424 }
425 }
426 else
427 include($className.'.php');//此行报错

什么意思,请教怎么解决
...全文
729 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
xuzuning 2014-05-28
  • 打赏
  • 举报
回复
echo $className; 看看是什么? Mongo.php 文件的位置对吗?

4,250

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧