| 425 | | // header ("Cache-Control: public, must-revalidate, post-check=0, pre-check=0"); |
|---|
| 426 | | // header("Pragma: hack"); |
|---|
| | 429 | header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filemtime).' GMT', true, $httpcode); |
|---|
| | 430 | header("Cache-Control: Public"); |
|---|
| | 431 | header("Pragma: Public"); |
|---|
| | 432 | header("Expires: " . gmdate("D, d M Y H:i:s", time() + (86400 * 30)) . " GMT"); |
|---|
| 428 | | header("Content-Length: $file->size"); |
|---|
| 429 | | header('Content-Disposition: inline; filename="'.$file->filename.'"'); |
|---|
| 430 | | header("Content-Transfer-Encoding: binary"); |
|---|
| 431 | | ob_clean(); |
|---|
| 432 | | flush(); |
|---|
| 433 | | $fp = @fopen($fullpath,"rb"); |
|---|
| 434 | | set_time_limit(0); |
|---|
| 435 | | fpassthru($fp); // avoids file touch bug with readfile |
|---|
| 436 | | fclose($fp); |
|---|
| | 434 | if ($httpcode=="200") { |
|---|
| | 435 | header("Content-Length: $file->size"); |
|---|
| | 436 | header('Content-Disposition: inline; filename="'.$file->filename.'"'); |
|---|
| | 437 | header("Content-Transfer-Encoding: binary"); |
|---|
| | 438 | ob_clean(); |
|---|
| | 439 | flush(); |
|---|
| | 440 | $fp = @fopen($fullpath,"rb"); |
|---|
| | 441 | set_time_limit(0); |
|---|
| | 442 | fpassthru($fp); // avoids file touch bug with readfile |
|---|
| | 443 | fclose($fp); |
|---|
| | 444 | } |
|---|