登录 注册
当前位置:主页 > 资源下载 > 10 > php_mongo.dll 适用于php5.2 5.3各种版本下载

php_mongo.dll 适用于php5.2 5.3各种版本下载

  • 更新:2024-05-17 23:03:14
  • 大小:393KB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:MongoDB - 数据库
  • 格式:ZIP

资源介绍

[PHP 5.2 VC6 Non-Thread-Safe Mongo extensi [PHP 5.2 VC6 Thread-Safe Mongo extension] [PHP 5.3 VC6 Non-Thread-Safe Mongo extensi [PHP 5.3 VC6 Thread-Safe Mongo extension] [PHP 5.3 VC8 Non-Thread-Safe Mongo extensi [PHP 5.3 VC8 Thread-Safe Mongo extension] [PHP 5.3 VC9 Thread-Safe Mongo extension] 解决 php_mongo.dll模块不能加载 在PHP中安装php_mongo.dll的扩展中,遇到 mongo.dll加载不了, 1.检查了下自己PHP版本为5.2,检查到原因php_mongo.dll与PHP版本不匹配, 2.重新在https://github.com/mongodb/mongo-php-driver/downloads下载了mongo-1.1.4.zip 3.解压mongo-1.1.4.zip\mongo-1.1.4-php5.2vc6ts , 4.将php_mongo.dll覆盖D:\wamp\bin\php\php5.2.9-1\ext\php_mongo.dll, 5.重启apache,安装OK。 找到代码: <?php $mongo_server_name = 'admin'; $mongo_server_pwd = 'admin'; // 连接Mongo数据库 数据库地址:端口/账号:密码; $mongo = new Mongo('mongodb://localhost:27017/admin:admin'); // 选择一个数据库和要操作的集(如果没有数据库默认创建) //$collection = $mongo->selectDB('hf_note')->selectCollection('AccessaLog'); //方法一 $collection = $mongo->selectCollection('hf_note', 'AccessaLog'); //方法二 $dataList = $collection->find(); foreach ($dataList as $key => $val) { var_dump($val); } 运行结果: array '_id' =>object(MongoId)[7] public '$id' =>string'4f570e3775b7e117a0b38ef6'(length=24) 'username' =>string'lijunhua'(length=8) 'password' =>string'123456'(length=6) 'sex' =>string'male'(length=4) 'age' =>int27array '_id' =>object(MongoId)[8] public '$id' =>string'4f570f4175b7e117a0b38ef7'(length=24) 'username' =>string'harris'(length=6) 'password' =>string'harris'(length=6) 'sex' =>string'male'(length=4) 'age' =>int28array '_id' =>object(MongoId)[7] public '$id' =>string'4f570f9c75b7e117a0b38ef8'(length=24) 'username' =>string'amdin'(length=5) 'password' =>string'admin'(length=5) 'sex' =>string'male'(length=4) 'age' =>int27