
<?php
include($_GET['page'].'.php'); // Nous appelons le contenu central de la page
?>
Il ne me reste plus que celui-ci placé dans mon cadre:<?php
// On définit le tableau contenant les pages autorisées
// ----------------------------------------------------
$pageOK = array('echecs' => 'echecs.php',
'accueil' => 'accueil.php');
// On teste que le paramètre d'url existe et qu'il est bien autorisé
// -----------------------------------------------------------------
if ( (isset($_GET['page'])) && (isset($pageOK[$_GET['page']])) ) {
include($pageOK[$_GET['page']]); // Nous appelons le contenu central de la page
} else {
include('accueil.php'); // Page par défaut quant elle n'existe pas dans le tableau
}
?>
A l'arrivée sur le site j'ai bien ma page accueil.php qui se greffe dans le cadre. En revanche, en cliquant sur le lien Echecs, j'atterris toujours sur la page accueil.php.Code : Tout sélectionner
<a href="index.php?page=echecs">Echecs</a>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>KELBOREVE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<STYLE type=text/css>A {
FONT-WEIGHT: bold; COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
FONT-WEIGHT: bold;
TEXT-DECORATION: underline;
COLOR: #FF0000;
}
TD {
FONT-SIZE: 10pt; FONT-FAMILY: Verdana,Geneva,Arial,Helvetica,sans-serif
}
TD.titre {
FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana,Geneva,Arial,Helvetica,sans-serif; FONT-WEIGHT: bold;
}
</STYLE>
</head>
<body bgcolor="#57B6FB">
<div align="center">
<table width="1024" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="800">
<table width="700" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="860">
<p align="center"><br>
<img src="images/bandeau%20copie.jpg" width="764" height="116"></p>
<p align="center"><br>
</p>
<div align="center">
<table width="935" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="184" height="511" align="center"> <table width="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td><table width="160" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="17" align="center" background="images/haut.jpg" class="titre">Nos
Sorties </td>
</tr>
<tr>
<td align="center"><table width="160" border="0" cellspacing="4" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td align="center"><p><font size="1"><a href="#">Parc
d'attractions </a><br>
<a href="#">Parcs naturels</a><br>
<a href="#">Parc aquatiques</a><br>
<a href="#">Villes</a><br>
<a href="#">Zones de loisirs</a></font></p></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td><table width="160" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="17" align="center" background="images/haut.jpg" class="titre">Coin
gourmand </td>
</tr>
<tr>
<td align="center"><table width="160" border="0" cellspacing="4" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td align="center"><font size="1"><a href="#">Restaurants</a><br>
<a href="#">Recettes</a></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td><table width="160" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="17" align="center" background="images/haut.jpg" class="titre">Hébergement</td>
</tr>
<tr>
<td align="center"><table width="160" border="0" cellspacing="4" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td height="24" align="center"><font size="1"><a href="#">Hôtels</a><br>
<a href="#">Gîtes</a></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td><table width="160" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="17" align="center" background="images/haut.jpg" class="titre">Nos
Loisirs </td>
</tr>
<tr>
<td align="center"><table width="160" border="0" cellspacing="4" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td height="24" align="center"><font size="1">
<a href="index.php?page=echecs">Echecs</a><br>
<a href="index.php?page=tarot" "Tarot ">Tarot</a><br>
<a href="#">Champignons</a><br>
<a href="#">Tricot</a><br>
<a href="#">Dessin</a><br>
<a href="#">Pêche</a><br>
<a href="#">Lecture</a><br>
<a href="#">Cinéma</a><br>
<a href="#">Tv</a></font></tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td><table width="160" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="17" align="center" background="images/haut.jpg" class="titre">Dijon</td>
</tr>
<tr>
<td align="center"><table width="160" border="0" cellspacing="4" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td height="24" align="center"><p><font size="1">
<a href="#">Parcs</a><br>
<a href="#">Ballades</a><br>
<a href="#">Restautants</a><br>
<a href="#">Evènements</a><br>
</font></p></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br> <br> </td>
<td width="751" align="center"> <div align="center">
<table width="550" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td><table width="550" height="75" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="550" height="17" align="center" background="images/haut.jpg" class="titre"> </td>
</tr>
<tr>
<td><table width="579" border="0" cellspacing="5" cellpadding="4" bgcolor="#FFFFFF">
<tr>
<td width="561"><p>
<?php
// On définit le tableau contenant les pages autorisées
// ----------------------------------------------------
$pageOK = array('echecs' => 'echecs.php',
'accueil' => 'accueil.php');
// On teste que le paramètre d'url existe et qu'il est bien autorisé
// -----------------------------------------------------------------
if ( (isset($_GET['page'])) && (isset($pageOK[$_GET['page']])) ) {
include($pageOK[$_GET['page']]); // Nous appelons le contenu central de la page
} else {
include('accueil.php'); // Page par défaut quant elle n'existe pas dans le tableau
}
?>
</p>
<p> </p>
<p> </p>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td height="25" align="center" valign="middle"></td>
</tr>
<tr>
<td height="17" align="center" valign="middle" background="images/head3.jpg"><font color="#808080">Copyright
© 2006 - </font><b>Kelboreve</b><font color="#808080"> - Tous droits
réservés</font></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
Code : Tout sélectionner
<html>
<head>
<title>Document sans titre</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p>Bienvenu sur mon site </p>
</body>
</html>
Code : Tout sélectionner
<html>
<head>
<title>Les echecs</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
On joue aux échecs...</html>
Code : Tout sélectionner
<p>Bienvenu sur mon site </p> et On joue aux échecs...Code : Tout sélectionner
<p>Bienvenu sur mon site </p>Code : Tout sélectionner
<p>On joue aux échecs</p>
Code : Tout sélectionner
<a href="include.php?page=tarot" "Tarot ">Code : Tout sélectionner
<a href="index.php?page=tarot">Tarot</a>echo "page : ".$_GET['page']." include : ".$pageOK[$_GET['page'];
<?php
// On définit le tableau contenant les pages autorisées
// ----------------------------------------------------
$pageOK = array('echecs' => 'echecs.php',
'accueil' => 'accueil.php');
// On teste que le paramètre d'url existe et qu'il est bien autorisé
// -----------------------------------------------------------------
if ( (isset($_GET['page'])) && (isset($pageOK[$_GET['page']])) ) {
echo "page : ".$_GET['page']." include : ".$pageOK[$_GET['page']];
include($pageOK[$_GET['page']]); // Nous appelons le contenu central de la page
} else {
include('accueil.php'); // Page par défaut quant elle n'existe pas dans le tableau
}
?>
Mais le résultat est le même :-(