Zrobiłem prosty test: (Apache 2.2.x)
<?php
header('Cache-Control: no-cache'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); header('Cache-Control: must-revalidate'); header('Content-Type: image/png');
file_put_contents
("tmp.log", "Start - " . microtime(true) . PHP_EOL
, FILE_APPEND
);
$fh = fopen("logo.png", "rb"); file_put_contents
("tmp.log", "Reading... " . microtime(true) . PHP_EOL
, FILE_APPEND
);
}
file_put_contents
("tmp.log", "Closing - " . microtime(true) . PHP_EOL
, FILE_APPEND
);
file_put_contents
("tmp.log", "Some extra code - " . microtime(true) . PHP_EOL
, FILE_APPEND
);
Efekt:
Kod
Start - 1344208985.1088
Reading... 1344208985.1341
Reading... 1344208986.1352
Reading... 1344208987.1372
Reading... 1344208988.1402
Reading... 1344208989.1463
Reading... 1344208990.2127
Reading... 1344208991.2143
Closing - 1344208992.2164
Some extra code - 1344208994.2185
A przeglądarka oczywiście wyświetla kolejne fragmenty obrazka.
Sprawdź czy powyższy kod zadziała u Ciebie, jeżeli nie sugerowałoby to problemy z konfiguracją serwera HTTP, ale z tym już pomóc nie jestem wstanie.