Bonjour a tous. Je narrive pa a utiliser les includes en php.
J'ai repris l'exemple du site d'alsa ms ca ne marche pa. Qq pourait me dire d'ou ca vient svp ? Merci. Voici le code
<html>
<head>
<style type="text/css"><!--body {margin: 0;
padding:0;position: absolute;width: 100%;height: 100%;font-family: verdana, arial, sans-serif;}.haut {width: auto;height: 126px;background-color: #06C;color: #fff;font-size: 36px;padding: 10px;}
.conteneur {
height: 338px;width: 100%;
}.gauche {position: absolute;left: 0;width: 180px;height: 338px;background-image: url(gauche.gif);}.frame {margin-left: 180px; /* on place ce bloc à droite du bloc menu de 180px de large */
width: auto;height: 338px;overflow: auto; /* cette propriété va permettre le scroll de ce bloc */font-size: 14px;}.bas {width: auto;height: 30px;background-color: #06C;color: #fff;font-size: 12px;padding: 10px;}--></style>
</head>
<body><div class="haut">mon site .com</div>
<div class="gauche">
<ul>
<li><a href="index.php?page=accueil">Accueil du site</a></li>
<li><a href="index.php?page=presentation">Présentation</a></li>
<li><a href="index.php?page=suite">Suite</a></li>
<li><a href="index.php?page=fin">Dernière page</a></li>
</ul>
</div>
<?php
if (!isset($_GET['page'])) $page= 'accueil'; else $page= $_GET['page'];
switch($page)
{
case 'accueil': include ('nba/accueil.txt');break;
case 'presentation': include ('presentation.txt');break;
case 'suite':include ('suite.txt');break;
case 'fin':include ('fin.txt');break;
}
?>
<div class="frame">
</div></body>
</html>
J'ai repris l'exemple du site d'alsa ms ca ne marche pa. Qq pourait me dire d'ou ca vient svp ? Merci. Voici le code
<html>
<head>
<style type="text/css"><!--body {margin: 0;
padding:0;position: absolute;width: 100%;height: 100%;font-family: verdana, arial, sans-serif;}.haut {width: auto;height: 126px;background-color: #06C;color: #fff;font-size: 36px;padding: 10px;}
.conteneur {
height: 338px;width: 100%;
}.gauche {position: absolute;left: 0;width: 180px;height: 338px;background-image: url(gauche.gif);}.frame {margin-left: 180px; /* on place ce bloc à droite du bloc menu de 180px de large */
width: auto;height: 338px;overflow: auto; /* cette propriété va permettre le scroll de ce bloc */font-size: 14px;}.bas {width: auto;height: 30px;background-color: #06C;color: #fff;font-size: 12px;padding: 10px;}--></style>
</head>
<body><div class="haut">mon site .com</div>
<div class="gauche">
<ul>
<li><a href="index.php?page=accueil">Accueil du site</a></li>
<li><a href="index.php?page=presentation">Présentation</a></li>
<li><a href="index.php?page=suite">Suite</a></li>
<li><a href="index.php?page=fin">Dernière page</a></li>
</ul>
</div>
<?php
if (!isset($_GET['page'])) $page= 'accueil'; else $page= $_GET['page'];
switch($page)
{
case 'accueil': include ('nba/accueil.txt');break;
case 'presentation': include ('presentation.txt');break;
case 'suite':include ('suite.txt');break;
case 'fin':include ('fin.txt');break;
}
?>
<div class="frame">
</div></body>
</html>