Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]pobieranie jpg
-Gość-
post
Post #1





Goście







Witam

Mam na stronie downlaods gdzie pobieram zdjecia jpg i dzieje sie cos takiego, ze czasami wysyla sie plik foto.jpg a czasami foto.jpg.html

kod, ktorego uzylem:
  1. header('Content-Type: application/octet-stream');
  2. header('Content-Disposition: attachment; filename=' . $file);
  3. header('Content-Type: application/force-download');
  4.  
  5. readfile(DOCROOT.'/content/downloads/'.$path.'/'.$file);


Jak moge poinformowac przegladarke, ze to JPG i ma nie dodawac html?
Go to the top of the page
+Quote Post

Posty w temacie
- Gość   [PHP]pobieranie jpg   2.11.2012, 11:20:24


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: 11.10.2025 - 07:11