Lister un répertoire de photo avec php
Résolu
kikoi1
Messages postés
43
Date d'inscription
Statut
Membre
Dernière intervention
-
kikoi1 Messages postés 43 Date d'inscription Statut Membre Dernière intervention -
kikoi1 Messages postés 43 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
J'ai trouver ce code qui permet de lister un répertoire sous php cependant je voudrais que sa affiche les photos avec un certain espace entre elle.
En plus il y a certaines photos qui ne s'affiche pas savez vous pourquoi?
J'ai trouver ce code qui permet de lister un répertoire sous php cependant je voudrais que sa affiche les photos avec un certain espace entre elle.
En plus il y a certaines photos qui ne s'affiche pas savez vous pourquoi?
A voir également:
- Lister un répertoire de photo avec php
- Google photo - Télécharger - Albums photo
- Photo aérienne de ma maison - Guide
- Photo filtre 7 gratuit - Télécharger - Retouche d'image
- Partage photo - Guide
- Faire un diaporama photo avec musique windows 10 - Guide
2 réponses
j'ai oublier le code desoler
<?php
$dir="ton_dossier_image";
$dossier=opendir($dir);
while($fichier=readdir($dossier)){
$berk=array('.', '..');
if(!in_array($fichier,$berk)){
$lien=$dir.'/'.$fichier;
print '<div style="float:left;height:75px;">';
if(file_exists($lien)){
print '<img src="'.$lien.'" alt="" style="padding: 10 10 10 10;"/><br />';
print '<a href="'.$lien.'">'.substr($fichier,0,-4).'</a>';
}
print '</div>';
}
}
?>
<?php
$dir="ton_dossier_image";
$dossier=opendir($dir);
while($fichier=readdir($dossier)){
$berk=array('.', '..');
if(!in_array($fichier,$berk)){
$lien=$dir.'/'.$fichier;
print '<div style="float:left;height:75px;">';
if(file_exists($lien)){
print '<img src="'.$lien.'" alt="" style="padding: 10 10 10 10;"/><br />';
print '<a href="'.$lien.'">'.substr($fichier,0,-4).'</a>';
}
print '</div>';
}
}
?>