Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Wyświetlanie plików wg daty
david8213
post
Post #1





Grupa: Zarejestrowani
Postów: 308
Pomógł: 0
Dołączył: 9.12.2009

Ostrzeżenie: (10%)
X----


Jak zrobić zeby wyświetlało mi pliki od najmłodszego

  1. <?php
  2. $directory="./dzien";
  3. $dir=opendir($directory);
  4.  
  5. while($file_name=readdir($dir))
  6. {
  7. if(($file_name!=".")&&($file_name!=".."))
  8. {
  9. $img = 'dzien/'.$file_name;
  10. echo ' <div class="bordered"><span class="bordered__text">';
  11. echo substr($file_name, 0, strrpos($file_name, '.'));
  12.  
  13. echo '</div>';
  14. echo '<a href="'.$img.'"><img src="'.$img.'" height="70%"/></a>';
  15.  
  16. }
  17. }
  18.  
  19. closedir($dir);
  20.  
  21.  
  22. ?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 06:47