décomposer site en php
Posté : 11 févr. 2013, 23:55
Bonjour, j'ai un soucis quand je clique sur mon lien livre d'or voila mon message :
Arboresance :
J'ai suivi le tuto https://www.youtube.com/watch?v=IA5-HcXABvoThe Requested URL /BMC/content/article/article1 was not found on this server
Arboresance :
- index.php
content- 404.php
index.php
article- article1.php
- 404.php
<?php
define("WEBROOT","/tuto/obstar/");
//echo WEBROOT;
if(!isset($_GET["p"])){ $_GET["p"]="index"; }
echo $_GET["p"].".php";
if(!file_exists("content/".$_GET["p"].".php")) { echo $content; $_GET["p"]="404"; }
ob_start();
include "content/".$_GET["p"].".php";
$content = ob_get_contents();
ob_end_clean();
include "template.php";
?>
template.php
<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>
.....