Need Help With Code
I am having problems with this bit of code.
<?php
require_once( "../database.cls.php" );
require_once( "../functions.inc.php" );
userPage();
$user = $_SESSION['user'];
$db = new MySQL( DB_HOST, DB_USER, DB_PASS, DB_NAME );
$_REQUEST['file'] = str_replace('../', '', $_REQUEST['file']);
$file = 'membershipfiles/level' . $user->level . '/' . $_REQUEST['file'];
if (file_exists($file)) {
$filesize = filesize($file);
header('Content-type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . $_REQUEST['file']);
header('Content-length: ' . $filesize);
readfile($file);
}else {
header('Location: /members/' . $file);
}
?>
It is downloading the requested SECURE DOWNLOAD file as the original named file ( for example: test.zip ) but it only contains text inside.
The text it contains is as follows.
<br />
<b>Warning</b>: readfile() has been disabled for security reasons in <b>/home/copyknj/public_html/members/download.php</b> on line <b>24</b><br />
Any help with this problem will be greatly appreciated
Thanks
John
Place holder.
Get Instant Access To my Top 10 Blogging Tools & Resources dld.bz/fJH6e