Ajout d'une partie du TP4

This commit is contained in:
2024-03-17 11:31:57 +01:00
commit 915052df70
9 changed files with 396 additions and 0 deletions

27
TP4/web/index.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
$redis = new Redis();
$redis->connect('tp4-redis-1', 6379);
$code = $redis->get('code');
echo "
<table>
<tr>
<td>SERVERNAME</td>
<td><b>".$_SERVER['SERVER_NAME']."</b></td>
</tr>
<tr>
<td>HOSTNAME</td>
<td><b>".gethostname()."</b></td>
</tr>
<tr>
<td>ETUDIANT</td>
<td><b>".$_ENV['NOM']." / ".$_ENV['PRENOM']."</b></td>
</tr>
<tr>
<td>CODE</td>
<td><b>$code</b></td>
</tr>
</table>";