I'm new to php and am developing my web site. Using DW5, I want to call a pdf file of my resume to download using the following code
<a href="resume_pdf.php"><img alt="Download PDF" src="images/pdf_download_button.gif" /></a>
Alan's Resume<p></p>
The resume_pdf.php file reads:
<?php
header('Content-disposition: attachment; filename=/ab_files/abResume2011e.pdf');
header('Content-type: application/pdf');
readfile('/ab_files/abResume2011e.pdf');
?>
When in my web page and I click the pdf download icon, I get the following message from adobe acrobat:
Acrobat could not open '_ab_files_abResume2011e (2).pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
To create an Adobe PDF document, go to the source application. Then print the document to Adobe PDF.
I've checked the file on the server and it is fully functional
What am I doing wrong. Is my code wrong and what do I do to download the file?