mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-06-27 12:05:06 +02:00
replace fopen/fread loop with readfile
This commit is contained in:
parent
fc5cd15819
commit
bf1fee8347
|
@ -31,14 +31,7 @@
|
||||||
$stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT";
|
$stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT";
|
||||||
header("Last-Modified: $stamp", true);
|
header("Last-Modified: $stamp", true);
|
||||||
|
|
||||||
$fp = fopen($filename, "r");
|
readfile($filename);
|
||||||
|
|
||||||
if ($fp) {
|
|
||||||
while ($data = fread($fp, 32768)) {
|
|
||||||
print $data;
|
|
||||||
}
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
|
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user