voici mon code:
header.php:
Code : Tout sélectionner
<?
// extraction du nom de fichier courant, sans extension
$pageName = basename($_SERVER['PHP_SELF'],".php");
// attribution de l'image (et du titre, par la même occasion)
switch($pageName) {
case 'murs': $imagefond = "images/murs.jpg"; $title = "Murs"; break;
case 'sols': $imagefond = "images/sols.jpg"; $title = "Sols"; break;
case 'cuisinnes': $imagefond = "images/bains.jpg"; $title = "Cuisinnes"; break;
case 'realisations': $imagefond = "images/reas.jpg"; $title = "Realisations"; break;
default: $imagefond = "images/index.jpg"; $title = "Accueil"; break;
}
?>
<html><head>
<title><?= $title?></title>
<link type="text/css" rel="stylesheet" href="styles.css">
<style type="text/css">
body { background-image: url("<?= $imagefond?>") }
</style>
</head><body>Code : Tout sélectionner
body { background: #ccc 95% 95% fixed no-repeat }Code : Tout sélectionner
<? include('header.php'); ?>
<div>index</div>
</body></html>pourtant je suis bien sous wamp les services sont op etc
help me please