j'aimerais pouvoir afficher des images sur une page indépendante qui se trouve à la racine de mon fofo, dans le dossier "images/avatarfth/"
alors pour le moment j'y suis arrivé certes... mais franchement mon code n'est pas propre du tout
voici le code de ma page php qui se situe dans le même dossier ou je stocke mes avatars :
Code : Tout sélectionner
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
.back{
color: #184002;
background-color: #0F2229;
background: url("http://www.graphogames.fr/Relax/styles/FantasyLove/theme/images/background_1.jpg");
background-repeat: no-repeat;
background-position: top center;
background-attachment: fixed;
background-size: cover;
margin: 0 !important;
}
</style>
</head>
<body class="back">
<div style="border-radius: 5px !important; margin: 5px auto; background: #D7D0B3 none repeat scroll 0 0 !important;
border: 1px solid #97374D;" align="center">
<p style="border-radius: 5px; border: 2px solid green; width: 450px; text-align: center; margin: 5px 10px; font-size: 22px; font-weight: bold">Avatars created by FranckTH for all the World</p>
<p><br />La page peut prendre un certain temps à s'afficher...<br />The page may take some time to display...</p>
<tr>
<?php
$handle=opendir('.');
while ($file = readdir($handle))
{
if ($file != "." && $file != ".." && $file != "avatarfth.php") //remplacer page.php par le nom de la page (si la page est dans le mm rep evidemment
{
$nb_cols=10; //Ici c'est 10 colonnes
$file2 = str_replace(".gif","",$file);
echo "<td valign='center' align='center'><img title=\"$file2\" src=\"$file\" border=\"0\"><td>";
$i= ($i + 1) % $nb_cols;
if($i==0)
{echo "</tr><tr>";}
}
}
closedir($handle);
?>
</tr>
</div>
</body>
http://www.graphogames.fr/Relax/images/ ... tarfth.php
Si c'est impossible, pas grave, je n'en mourrais pas ce soir
En tout cas sympa ce petit forum de test
Cordialement FranckTH