-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowDatos.php
More file actions
44 lines (37 loc) · 956 Bytes
/
showDatos.php
File metadata and controls
44 lines (37 loc) · 956 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>Datos HW </title>
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-primary bg-primary">
<a class="navbar-brand text-white" href="index.php">Inicio</a>
</nav>
<div class="container">
<div class="row">
<div class="col-sm-12">
<?php
require 'vendor/autoload.php';
$cn = (new MongoDB\Client("mongodb://127.0.0.1:27017"))->dbname->BDequipos;
if($cn==true) {
echo "<H5>:. TOTALIDAD DATOS INSERTADOS EN LA BD.:</H5><br>"; //porque no hubo excepciones
}
$client = new MongoDB\Client();
$nom = $client->BDequipos->conexion;
$cursor = $nom->find();
foreach($cursor as $doc) {
echo 'IDPC: ' .$doc['idpc'];
echo 'IP: ' .$doc['ip'];
echo 'MAC: ' .$doc['mac'];
echo"<br>";
}
?>
</div>
</div>
</div>
</body>
</html>