Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] wielkość pliku
peter13135
post
Post #1





Grupa: Zarejestrowani
Postów: 1 447
Pomógł: 191
Dołączył: 26.03.2008

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $info=getimagesize('http://forum.php.pl/style_images/1/logo4.gif');
  3. print_r($info);
  4. echo filesize('http://forum.php.pl/style_images/1/logo4.gif')
  5. ?>


funkcja filesize zwraca bląd "stat failed"
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
mac_fly
post
Post #2





Grupa: Zarejestrowani
Postów: 46
Pomógł: 18
Dołączył: 11.08.2008
Skąd: 127.0.0.1

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $file = file_get_contents("http://forum.php.pl/style_images/1/logo4.gif");
  3. $file2 = fopen("logo.gif", "w+");
  4. fwrite($file2, $file);
  5. fclose($file2);
  6. $plik=filesize('logo.gif');
  7. echo "Wielkosc pliku: $plik";
  8. ?>
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: 12.10.2025 - 18:12