我目前正在使用 MongoDB 使用php Kohana 框架开发应用程序 . 我已经为MongoDB模块提供了适合此框架的link . 按照给出的指示,我坚持在这里不能进行进一步的开发工作 . 基于MongoDB的查询无法与此模块一起使用 . 在从集合中选择单个文档时,代码获取错误 .
<?php defined('SYSPATH') OR die('No Direct Script Access');
Class Model_Cms extends Model
{
public function __construct()
{
$this->mongo_db = MangoDB::instance('default');
}
/*Get the CMS Content*/
public function getcmscontent($content,$default_companyid="")
{
$cms_result = $this->mongo_db->findOne('cms');
return $cms_result;
}
}
任何人都可以帮助我继续前进 .
1 回答
在这个问题花了几个小时后,我已经使用过这种方法 .