Initial import.
[siap.git] / _system / scripts / download.php
CommitLineData
696f20d5
MS
1<?
2$file = $_GET["file"];
3$name = $_GET["name"];
4
5if ($file != "") {
6
7 $ext = substr($arq, -4);
8
9 if ($name == "") {
10 $arr = split("/", $file);
11 $name = $arr[sizeof($arr) - 1];
12 }
13
14 header("Content-type: " . $ext);
15 header("Content-Disposition: attachment; filename=" . $name);
16
17 readfile("../../" . $file);
18}
19?>