décomposer site en php

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : décomposer site en php

décomposer site en php

par aurelienT » 11 févr. 2013, 23:55

Bonjour, j'ai un soucis quand je clique sur mon lien livre d'or voila mon message :
The Requested URL /BMC/content/article/article1 was not found on this server
J'ai suivi le tuto https://www.youtube.com/watch?v=IA5-HcXABvo
Arboresance :
  • index.php
    content
    • 404.php
      index.php
      article
      • article1.php
    template.php
index.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>
.....