I have an attachement
The name of CV.docx in the server is "cd80f871f7e8d4dfjz.docx", the system changed the name when file was uploaded.In attachment.php I get the attachement "Real Name" and "Changed name" from database .Code:<a href="http://mydomain.com/attachment.php?&C=cd80f871f7e8d4dfjz&id=8">CV.docx</a>
After that
Where $RN is the "Real Name".PHP Code:header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=$RN");
$file=file_get_contents("attaches/".$FN);
echo $file;
And $FN is the Changed Name(Name in the server)
So when I click on a link a dialog box is displayed with "Open", "Save" and "Cancel" buttons.
If I save the file it works good.
But when I try to open the file with IE, this messages occurs
The file could not be found.
(C:\...\CV[1].docx\)
With other browsers this method is works.



Reply With Quote


Bookmarks