php链接mongo数据库
半支烟z 2015-06-30 10:51:11 $conn = new Mongo("mongodb://admin:admin@localhost:27017/local"); ///这个就是第11行
这么写完之后报错
( ! ) Deprecated: main(): The Mongo class is deprecated, please use the MongoClient class in D:\bzyweb\test2\conn.php on line 11
Call Stack
# Time Memory Function Location
1 0.0010 238592 {main}( ) ..\conn.php:0
( ! ) Fatal error: Uncaught exception 'MongoConnectionException' with message 'Failed to connect to: localhost:27017: Authentication failed on database 'local' with username 'admin': auth fails' in D:\bzyweb\test2\conn.php on line 11
( ! ) MongoConnectionException: Failed to connect to: localhost:27017: Authentication failed on database 'local' with username 'admin': auth fails in D:\bzyweb\test2\conn.php on line 11
Call Stack
# Time Memory Function Location
1 0.0010 238592 {main}( ) ..\conn.php:0
2 0.0010 239720 __construct ( ) ..\conn.php:11