Bonjour,
j'ai un petit souci d'Url ou de php je ne sais pas.
J'ai utilisé RewriteRule dans le Htacces comme ceci :
RewriteRule ^article/(.*) article.php?idArt=$1
le prolème c'est que quand je vais sur cette page, le php ne fonctionne pas...
par contre si je marque www.monsite.com/article.php?idArt=1 , ça fonctionne...
Comment faire svp ?
Voici ma page article.php :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <?php
include("header.php");
$article=mysql_fetch_array(mysql_query("SELECT * FROM news WHERE idNews = '{$_GET['idArt']}'"));
?>
<div class="art">
<h2><?php echo $article['titre']; ?></h2>
<p>
publié le <?php echo date("d/m/Y", strtotime($article['dateNews'])); ?>
</p>
<img src="http://www.monsite.com/img/<?php echo $article['image']; ?>" alt="<?php echo $article['titre']; ?>" />
<p class="resumeArt">
<?php echo $article['resume']; ?>
</p>
<a href="http://www.monsite.com/">Retour sur l'accueil</a>
</div>
<?php include("footer.php"); ?> |
Partager