summaryrefslogtreecommitdiff
path: root/image.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-31 09:54:52 +0400
committerAndrew Dolgov <[email protected]>2013-03-31 09:54:52 +0400
commitbf1fee83471cc9efef9f8d3ade0cd00b84633cf1 (patch)
tree0a379bd7ab5f320474da86afea37829413f8ec77 /image.php
parentfc5cd15819dfc603e137a24d85239a15ab6cb1ee (diff)
replace fopen/fread loop with readfile
Diffstat (limited to 'image.php')
-rw-r--r--image.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/image.php b/image.php
index 60f2cc839..94cb8e817 100644
--- a/image.php
+++ b/image.php
@@ -31,14 +31,7 @@
$stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT";
header("Last-Modified: $stamp", true);
- $fp = fopen($filename, "r");
-
- if ($fp) {
- while ($data = fread($fp, 32768)) {
- print $data;
- }
- fclose($fp);
- }
+ readfile($filename);
} else {
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");