source: sandbox/filemanager/inc/download.php @ 1693

Revision 1693, 840 bytes checked in by amuller, 14 years ago (diff)

Ticket #597 - melhorias no modulo gerenciador de arquivos para arquivos grandes

  • Property svn:executable set to *
Line 
1<?php
2/* This single file is used to increase memory_limit using .htaccess*/
3if(!isset($GLOBALS['phpgw_info'])){
4        $GLOBALS['phpgw_info']['flags'] = array(
5                'currentapp' => 'filemanager',
6                'nonavbar'   => true,
7                'noheader'   => true
8        );
9}
10require_once '../../header.inc.php';
11
12$bo = CreateObject('filemanager.bofilemanager');
13$path = base64_decode($_GET['path']);
14$file = base64_decode($_GET['file']);
15
16if($file)
17{
18        //$GLOBALS['phpgw']->browser->content_header($file);
19        header ("Content-Type: application/octet-stream");
20        header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
21        header("Pragma: public");
22        header("Expires: 0");
23        header ("Content-Disposition: attachment; filename=\"". addslashes($file)."\"");
24        echo $bo->vfs->read(array('string' => $file));
25        $GLOBALS['phpgw']->common->phpgw_exit();
26}
27?>
Note: See TracBrowser for help on using the repository browser.