Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> pobieranie plików
koneser69
post
Post #1





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 18.11.2008

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


witam

Za pomocą poniższego kodu realizuje pobieranie plików. Problem jest w tym, że podczas pobierania nie można wejść na żadną stronę ponieważ cały dostępny transfer jest zapchany. Czy istnieje jakiś sposób na obejście tego problemu (IMG:style_emoticons/default/questionmark.gif)

  1. header('Content-Description: File Transfer');
  2. header('Content-Type: application/octet-stream');
  3. header('Content-Disposition: attachment; filename='.$fileName);
  4. header('Content-Transfer-Encoding: binary');
  5. header('Expires: 0');
  6. header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  7. header('Pragma: public');
  8. header('Content-Length: ' . filesize($dir.$lock));
  9. readfile($dir.$lock);
  10.  
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: 5.10.2025 - 03:29