Zigon
November 16th, 2011, 05:12 PM
I have a button where the user can download a pdf file, instead of opening in their browser. This works on my local server but when when hosted on Yahoo, I receive "500 - Internal Server Error".
index.php:
<a href="../download.php"><img src="../site_images/pdf_icon.png"></a>
download.php:
header('Content-disposition: attachment; filename=n_catalog.pdf');
header('Content-type: application/pdf');
readfile('catalog.pdf');
EDIT: Fixed it by updating the PHP version on the server.
index.php:
<a href="../download.php"><img src="../site_images/pdf_icon.png"></a>
download.php:
header('Content-disposition: attachment; filename=n_catalog.pdf');
header('Content-type: application/pdf');
readfile('catalog.pdf');
EDIT: Fixed it by updating the PHP version on the server.