diff options
author | ramon <ramongomez@us.es> | 2017-11-11 13:12:31 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-11-11 13:12:31 +0000 |
commit | b9bdfa03488ddb78fd2c768ab95ed4dc766a2f3e (patch) | |
tree | 5ca1ed72cfc741940dab2de626b50d3550814d57 /admin/WebConsole/descargas | |
parent | 41876cbfdb5b38e77c571da4f0de2a2a292fc5cb (diff) |
#718: Código para descargas de OGAgent independiente del uso de Apache.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5506 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/descargas')
-rw-r--r-- | admin/WebConsole/descargas/index.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/admin/WebConsole/descargas/index.php b/admin/WebConsole/descargas/index.php index edf7bd4a..bb434bee 100644 --- a/admin/WebConsole/descargas/index.php +++ b/admin/WebConsole/descargas/index.php @@ -57,11 +57,10 @@ chdir($oldpwd); function sendFile($file) { // Check if file exists in current directory and it isn't this file. if (file_exists($file) and strpos($file,"/") === false and $file !== basename(__FILE__)) { - $file_info = apache_lookup_uri($file); - header('Content-Type: ' . $file_info->content_type); + header('Content-Type: ' . mime_content_type($file)); header('Content-Length: ' . filesize($file)); header('Content-Disposition: attachment; filename="' . $file . '"'); - virtual($file); + readfile($file); } } |