![]() |
![]() |
--gomu-- |
![]()
Post
#1
|
Goście ![]() |
witam, napisalem skrypcik ktory udaje dany plik odczytujac go z buforowaniem, ale nie dziala, zabraklo mi pomyslow :/
Kod <?php $file = './r_b1.rar'; $fakename = "Archiwum.rar"; header("Cache-control: private"); header("Content-Type: application/octet-stream"); header("Content-Length: ".filesize($file)); header("Content-Disposition: attachment; filename=".basename($fakename)); header("Connection: Close"); $fp = fopen ($file, "r"); while(!feof($fp)) { $file_buffer = fread($fp, 2048); echo $file_buffer; ?> Prosze o pomoc, co tutaj jest zle? |
|
|
![]() |
--gomu-- |
![]()
Post
#2
|
Goście ![]() |
Aha, jeszcze jedno pytanko, jak beda wygladaly naglowki dla pliku jpg?
nie chodzi mi o samo "header('Content-Type: image/jpeg');" tylko calosc az do readfile(). |
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 853 Pomógł: 25 Dołączył: 27.08.2003 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
szukaj u źródeł
-------------------- "If debugging is the process of removing bugs, then programming must be the process of putting them in..."
sobstel.org |
|
|
--gomu-- |
![]()
Post
#4
|
Goście ![]() |
Nic pomocnego tam nie widze...
|
|
|
![]()
Post
#5
|
|
![]() Grupa: Zarejestrowani Postów: 853 Pomógł: 25 Dołączył: 27.08.2003 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
Nic pomocnego tam nie widze... a powinieneś. zobacz jak tam obsługiwane jest buforowanie. w twoim przykładzie nie zwracasz nawet nagłówka not-modified, czy expire przez co twoj plik nigdy nie będzie buforowany. -------------------- "If debugging is the process of removing bugs, then programming must be the process of putting them in..."
sobstel.org |
|
|
--gomu-- |
![]()
Post
#6
|
Goście ![]() |
sory ale nic tam nie widze...
|
|
|
--gomu-- |
![]()
Post
#7
|
Goście ![]() |
Nic sie nei zmienilo, nadal nie wiem jak zrobic czytanie z buforowaniem, i nic nie widze w tym zalaczniuku....
Prosze o pomoc. jakies dodatkowe naprowadzenie... cokolwiek.,.. |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 03:34 |