Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Wysylanie naglowka header()
webmaestro
post
Post #1





Grupa: Zarejestrowani
Postów: 48
Pomógł: 0
Dołączył: 25.12.2009

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


  1. <?
  2. $filePath ="a/";
  3. $fileName="a.zip";
  4. $fd = fopen($filePath.$fileName,"r");
  5. $size = filesize($filePath.$fileName);
  6. $contents = fread($fd, filesize($filePath.$fileName));
  7.  
  8. fclose($fd);
  9.  
  10. header("Content-Type: application/octet-stream");
  11. header("Content-Length: $size;");
  12. header("Content-Disposition: attachment; filename=$fileName");
  13.  
  14. echo $contents;
  15. ?>


Mam taki kod. Nie wysyła mi nagłowek wagi pliku, co zle zrobilem??
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 21.08.2025 - 03:47