Answer the question
In order to leave comments, you need to log in
How to connect MongoDB to yii?
Started learning Yii 1.1. There was a need to connect the mongodb database using the mongodbsuite extension. I read off-documentation . Set up
main.php :
[php]
'import' => array(
...
'ext.YiiMongoDbSuite.*',
),
'components' => array(
...
'mongodb' => array(
'class' => 'EMongoDB',
'connectionString' => 'mongodb://localhost',
'dbName' => 'testdb',
'fsyncFlag' => true,
'safeFlag' => true,
'useCursor' => false
),
),
CDbConnection.connectionString cannot be empty.
if(Yii::app()->{$this->connectionId}===null)
Answer the question
In order to leave comments, you need to log in
In the latest version, the protocol has changed in mongodb and apparently in the outdated ivaywai no one has
updated the old monga. What does the database in the date folder mean in your monga itself is running?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question