Mi dà questo errore:

Warning: readfile("ÐÏࡱá") - Invalid argument


Il codice che ho scritto è questo:

$pdf=$_POST['pdf'];

function getFile($fileName) {
if($file = fopen("../documenti/".$fileName, "rb")) {
$data = '';
while (!feof($file)) {
$data .= fread($file, 8192);
}
fclose($file);
return $data;
} else {
return FALSE;
}
}

header('Content-type: application/msword');
header('Content-Disposition: attachment; filename="downloaded.doc"');
$file=getFile($pdf);
readfile($file);