File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ RUN apt-get update && \
88 libjpeg62-turbo-dev \
99 libpng-dev \
1010 libjpeg-dev \
11- libmcrypt-dev
11+ pkg-config \
12+ libmcrypt-dev \
13+ libcurl4-openssl-dev \
14+ libssl-dev
1215
1316RUN docker-php-ext-configure gd \
1417 --enable-gd-native-ttf \
@@ -19,6 +22,9 @@ RUN docker-php-ext-configure gd \
1922 docker-php-ext-install opcache && \
2023 docker-php-ext-enable opcache
2124
25+ RUN pecl install mongodb && \
26+ docker-php-ext-enable mongodb
27+
2228RUN docker-php-ext-install pdo_mysql
2329RUN docker-php-ext-install mcrypt
2430RUN docker-php-ext-install zip
Original file line number Diff line number Diff line change 11<?php
2- echo "demo2 " ;
2+
3+ #$manager = new MongoDB\Driver\Manager("mongodb://hyb:123456@47.111.0.166:27017/test");
4+ $ manager = new MongoDB \Driver \Manager ("mongodb://hyb:123456@192.168.0.102:27017/test " );
5+
6+ $ query = new MongoDB \Driver \Query ([]);
7+
8+ $ cursor = $ manager ->executeQuery ('test.user ' , $ query );
9+
10+ foreach ($ cursor as $ document ) {
11+ print_r ($ document );
12+ }
You can’t perform that action at this time.
0 commit comments