forked from MagicMirrorOrg/MagicMirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
executable file
·62 lines (40 loc) · 906 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<html>
<head>
<title>Magic Mirror</title>
<meta name="google" value="notranslate" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
</head>
<body>
hello
<?php
phpinfo();
?>
<?php
$mongoDB = new Mongo();
$database = $mongoDB->selectDB("example");
$collection = $database->createCollection('TestCollection');
$collection->insert(array('test' => 'Test OK'));
$retrieved = $collection->find();
foreach ($retrieved as $obj) {
echo($obj['test']);
}
?>
adsfds
<?php
$m = new Mongo();
echo "test";
$db = $m->comedy;
echo "test";
$collection = $db->cartoons;
echo "test";
$obj = array ("title"=>"Calvin and hobbes");
$collection->insert($obj);
echo "test";
$cursor = $collection->find();
foreach($cursor as $obj) {
echo $obj["title"];
}
?>
good bye
</body>
</html>