mam taki skrypt:
<?
require ('func.php');
$addir='admin';
include ($addir.'/vars.php');
include ($addir.'/config.php');
if ($_SESSION['db']->connect($dbhost,$dbuser,$dbpasswd,$dbname)) {
$query = 'SELECT * FROM '.$prefix.'_downloads WHERE id=''.$id.''';
if ($_SESSION['db']->query($query))
$file = $_SESSION['db']->fetchArray();
$file['num'] = $_SESSION['db']->numRows();
$_SESSION['db']->close();
}
if ($file['num']==1) {
if (!$file['path']) {
$file['path']=$updir."/".$file['name'];
} else $file['size']=filesize_remote($file['path']);
header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=".$file['name']); header("Accept-Ranges: bytes"); header("Content-Length: ".$file['size']); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-transfer-encoding: binary"); ?>
niestety kazdy plik jaki chce sciagnac przez ten skrypt dostaje rozszerzenie .php, nazwa jest dobra tylko to rozszerzenie. co jest nie tak ?
help