Bonjour à tous , voilà j'ai crée un site internet et je cherche un script qui scan un dossier pour afficher les images dans celui ci.
J'ai essayé d'insérer ce script là ... sans résultat il n'affiche rien sur ma page
quelqu'un pourrait m'aider
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 <DIV ID=ejs_photo_box></div> <script type="text/javascript"> ejs_photo = new Array; <? $a = 0; $handle = opendir("photos"); while (($file = readdir())!=false) { clearstatcache(); if($file!=".." && $file!=".") { echo "ejs_photo[$a] = 'photos/$file'; "; $a++; } } closedir($handle); ?> function ejs_aff_photos(num) { if(document.getElementById) { ejs_fin = ""; if(num!=0) ejs_fin += "<A HREF=# onClick='ejs_aff_photos("+(num-1)+");return(false)'>< Précédent</A> "; if(num!=(ejs_photo.length-1)) ejs_fin += "<A HREF=# onClick='ejs_aff_photos("+(num+1)+");return(false)'>Suivant ></A>"; document.getElementById("ejs_photo_box").innerHTML = "<CENTER><IMG SRC='"+ejs_photo[num]+"' BORDER=0><BR>"+ejs_fin+"</CENTER>"; } } window.onload = new Function("ejs_aff_photos(0)") </script>![]()
Partager