Set filename in case browser downloads file
This commit is contained in:
@@ -21,6 +21,7 @@ if (!$mime = $types[pathinfo($stat['name'],PATHINFO_EXTENSION)]) {
|
||||
$mime = "text/plain";
|
||||
}
|
||||
|
||||
header("Content-Disposition: inline; filename=".$stat['name']);
|
||||
header("Content-Type: ".$mime);
|
||||
header("Content-Length: ".$stat['size']);
|
||||
echo $zip->getFromIndex(0);
|
||||
|
||||
Reference in New Issue
Block a user