Pls any time i want to download .jar or .jad file extention it does not download when i use 0peramini browser, but instead its downloading the page...But other file type is being downloaded. Diz iz my dwnld code
plz wat c0uld b da problem...
PHP Code:
<?php
$filed = 'files/'.$info['name'];
$fp=fopen($filed, "rb");
$ext = strrchr($info['name'],'.');
$truext=str_replace(".","",$ext);
$truext=strtolower($truext);
$ext=strtolower($ext);
$name=str_replace("$ext","(site.name)$ext",$info['name']);
header('Content-type:application/force-download');
header('Content-disposition: attachment;filename="'.$name.'"');
header('Content-length: '.$info['size']);
fpassthru($fp);
fclose($fp);
}
} else echo 'file dont exist';
?>
Comment