Bonjour, j'ai un soucis quand je clique sur mon lien livre d'or voila mon message :
J'ai suivi l'arborescence :The Requested URL /BMC/content/article/article1 was not found on this server
- index.php
content
- 404.php
index.php
article
- article1.php
template.php
fichier index.php a la racine :
template.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <?php define("WEBROOT","http://localhost/BMC/content/"); //echo WEBROOT; if(!isset($_GET["p"])){ $_GET["p"]="index"; } echo "content/".$_GET["p"].".php"; if(!file_exists("content/".$_GET["p"].".php")) { $_GET["p"]="404"; } ob_start(); include "content/".$_GET["p"].".php"; $content = ob_get_contents(); ob_end_clean(); include "template.php"; ?>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <ul> <li><a href="<?php echo WEBROOT;?>index">Accueil</a></li> <li><a href="">Photo</a></li> <li><a href="<?php echo WEBROOT; ?>article/article1"> Livre d'or</a></li> <li><a href="">Contact</a></li> </ul> ..... <section> <?php echo $content; ?> </section> .....
Partager