Update webapp.php

This commit is contained in:
Namhyeon Go 2019-02-24 23:32:43 +09:00 committed by GitHub
parent 46c179ee53
commit c2818b644a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,10 +88,11 @@ if($is_redirect_to_index == true) {
if($is_static_file == true) { if($is_static_file == true) {
if(file_exists($appfile)) { if(file_exists($appfile)) {
set_header_content_type($end_era); set_header_content_type($end_era);
header("Cache-Control: max-age=86400");
$fp = fopen($appfile, "r") or die("file does not exists"); $fp = fopen($appfile, "r") or set_error_exit("file does not exists");
$buffer = fread($fp, filesize($appfile)); while(!feof($fp)) {
echo $buffer; echo fread($fp, 8192);
}
fclose($fp); fclose($fp);
} else { } else {
echo "File Not Found"; echo "File Not Found";