Taille de fichier?

Taille de fichier? - PHP - Programmation

Marsh Posté le 14-11-2002 à 11:11:10    

salut,
j'accede a un repertoire avec des images, comment obtenir leur taille?
Merci

Reply

Marsh Posté le 14-11-2002 à 11:11:10   

Reply

Marsh Posté le 14-11-2002 à 11:12:34    

voilà ce ke je fais

Code :
  1. function list_files($basedir)
  2. {
  3. if(is_dir($basedir))
  4. {
  5.  $thisdir = dir($basedir);
  6.  $result.="<table border=1>";
  7.  while ($entry=$thisdir->read())
  8.  {
  9.   if(($entry!='.') && ($entry!='..'))
  10.   {
  11.    $result.="<tr align=center><td align=center>";
  12.    $result.="<table border=0>";
  13.    $result.="<tr center=ALIGN><td align=center><a href=\"$basedir/$entry\"><img src=\"$basedir/$entry\" height=100 widh=80 border=0></a></td><tr>";
  14.    $result.="<tr center=ALIGN><td align=center>$entry</td>";
  15.    $result.="<tr center=ALIGN><td align=center><a href=\"$PHP_SELF?remove=$basedir/$entry\">Effacer</a></td>";
  16.    $result.="</table>";
  17.    $result.="</td></tr>";
  18.   }
  19.  }
  20. }
  21. $result.="</table>";
  22. return $result;
  23. }

Reply

Marsh Posté le 14-11-2002 à 12:07:01    

http://www.php.net/manual/fr/function.filesize.php


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed