In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1, version yii-1.1.13.e9e4a0.tar.gz,YiiMongoDbSuite-1.3.6.3.zip 2, plug-in home page http://www.yiiframework.com/extension/yiimongodbsuite 3, download plug-in https://github.com/canni/YiiMongoDbSuite 4, extract it to the yii application plug-in directory app\ protected\ extensions and rename it to YiiMongoDbSuite 5 Modify the self-loading and component configuration in the application main configuration file app\ protected\ config\ main.php 'import' = > array (.' ext.YiiMongoDbSuite.*', / / plug-in root file), 'components' = > array (.' mongodb' = > array ('class' = >' EMongoDB', / / main file 'connectionString' = >' mongodb://127.0.0.1:27017', / / server address' dbName' = > 'myDatabaseName') / / Database name 'fsyncFlag' = > true, / / mongodb ensures that all writes written to the database are securely stored to disk' safeFlag' = > true, / / the state of all write operations waiting to be retrieved And check 'useCursor' = > false, / / set to true, cursor will be enabled),), 6, add a new operation / * UserController new operation * call address: http://.../app/index.php?r=user/indexm*/public function actionIndexm () {$model = new Userm () / / Model object $data = array (/ / Model data 'username'= >' 11111data,); $model- > unsetAttributes (); / / Clean original data $model- > attributes=$data; / / receive new data $model- > save (); / / Save / update (with authentication) $da = User::model ()-> findAll (); / / query print_r ($da); exit ();}
I always have the problem that when I configure it, the new model will make the page inaccessible. Finally, I will change the mongodb://localhost to mongodb://127.0.0.1:27017.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.