[ 139970 ]
[ 38.103.63.16 ]
Réalisation du site en PHP (partie 5)Etape 5 - RésultatVoici votre site réalisé, à vous de le compléter à votre guise. Cliquez ici pour Voir l'aperçu du résultat. Le fichier index.php :
<?php
error_reporting(E_ALL ^ E_NOTICE);
$page = $_GET['page'];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Mon premier site en PHP</title>
<meta http-equiv="Content-Style-Type" content="text/css">
</head>
<body style="font-family: Arial, sans-serif;font-size: 12px; color: #000000;">
<table width="600" align="center" valign="top" cellspacing="2" cellpadding="2" border="0">
<tr valign="middle">
<td width="600" height="90" colspan="2" bgcolor="#0068B4">
<?php include("/header.php"); // appel du fichier header?>
</td>
</tr>
<tr valign="top">
<td width="120" height="350" rowspan="2" bgcolor="#606DB2">
<?php include("/menu.php"); // appel du fichier menu?>
</td>
<td width="480" height="310" bgcolor="#AFD394">
<div>
<?php
if (file_exists("pages/$page.html") == TRUE)
{include("pages/$page.html");}
else
{include("pages/accueil.html");}
?>
</div>
</td>
</tr>
<tr valign="middle">
<td width="480" height="40" bgcolor="#CDBCA3">
<?php include("/footer.php"); // appel du fichier footer?>
</td>
</tr>
</table>
</body>
</html>
Le fichier header.php : <div style="font-size: 24px; color: #FFFFFF;">Mon premier site en PHP</div> Le fichier menu.php : <div style="font-size: 13px;"><b>MENU :</b><br> <ul> <li><a href="index.php?page=accueil"> Accueil</a></li> <li><a href="index.php?page=rubrique1"> Rubrique 1</a></li> <li><a href="index.php?page=rubrique2"> Rubrique 2</a></li> <li><a href="index.php?page=rubrique3"> Rubrique 3</a></li> <li><a href="index.php?page=rubrique4"> Rubrique 4</a></li> </ul> </div> Le fichier footer.php : <div>2005 Copyright by Moi</div> |