fork download
  1. <?php
  2. $urlphoto = "upload";
  3.  
  4. // nom du répertoire qui contient les images
  5. $nomRepertoire = "upload";
  6. if (is_dir($nomRepertoire))
  7. {
  8. $dossier = opendir($nomRepertoire);
  9. while ($Fichier = readdir($dossier))
  10. {
  11. if ($Fichier != "." AND $Fichier != ".." AND (stristr($Fichier,'.gif') OR stristr($Fichier,'.jpg') OR stristr($Fichier,'.png') OR stristr($Fichier,'.bmp')))
  12. {
  13. // Hauteur de toutes les images
  14. $h_vign = "120";
  15. $taille = getimagesize($nomRepertoire."/".$Fichier);
  16. $reduc = floor(($h_vign*100)/($taille[1]));
  17. $l_vign = floor(($taille[0]*$reduc)/100);
  18.  
  19. echo '<a target="_blank" href="', $urlphoto, '/',$Fichier, '">';
  20. echo '<img src="', $urlphoto, '/',$Fichier, '" ';
  21. echo "width='$l_vign' height='$h_vign'>";
  22. echo "</a>&nbsp;";
  23. }
  24. }
  25. closedir($dossier);
  26. }else{
  27. echo' Le répertoire spécifié n\'existe pas';
  28. }
  29. ?>
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:11:70: warning: multi-character character constant [-Wmultichar]
prog.cpp:11:98: warning: multi-character character constant [-Wmultichar]
prog.cpp:11:126: warning: multi-character character constant [-Wmultichar]
prog.cpp:11:154: warning: multi-character character constant [-Wmultichar]
prog.cpp:19:16: warning: character constant too long for its type [enabled by default]
prog.cpp:19:70: warning: multi-character character constant [-Wmultichar]
prog.cpp:20:16: warning: character constant too long for its type [enabled by default]
prog.cpp:20:55: warning: multi-character character constant [-Wmultichar]
prog.cpp:27:8: warning: character constant too long for its type [enabled by default]
prog.cpp:1:1: error: expected unqualified-id before ‘<’ token
prog.cpp:5:1: error: ‘$nomRepertoire’ does not name a type
prog.cpp:6:1: error: expected unqualified-id before ‘if’
stdout
Standard output is empty