I have the code like this to download pdf file :
[php]<?$basedir = "public_html/UserFiles/Data/";
$filename = $_GET['file'];
header("Content-Type: application/octet-stream");
$save_as_name = $_GET['file'];
header("Content-Disposition: attachment; filename=\"$save_as_name\"");
readfile($basedir.$filename);?>[/php]
but i cannot open the output with error window message :
"Adobe reader coundnot open the file because it is either not supported file style or because the file has been damaged"
Thank you to any helps