Posted by Steve on 11/29/06 04:35
contents of get.file.php:
<?
require_once 'site.cfg.php';
$fileData = '';
$fileName = $_REQUEST['fileName'];
$filePath = $site->uploadBaseDirectory;
if ($fileName != ''){ $fileData = @file_get_contents($filePath .
$fileName); }
header('pragma: public' );
header('expires: 0' );
header('cache-control: private', false );
header('cache-control: must-revalidate, post-check=0, pre-check=0' );
header('content-disposition: attachment; filename="' . $fileName . '"' );
header('content-size: ' . count($fileData) );
header('content-transfer-encoding: binary' );
header('content-type: application/octet-stream' );
echo $fileData;
?>
Navigation:
[Reply to this message]
|