Jump to content

ftp download problem


Guest Lumberjack

Recommended Posts

Guest Lumberjack

I've just finished writing a website for my parents villa. I've only one problem and that is the link I will need so that visitors can download the PDF of the 'Booking Terms & Conditions'. When the link is currently clicked it just opens the file in an IE Explorer window without giving the option to save it.Any ideas?The code is as follows:----------------------------------------------------------------------------------------------------------------------------- <p align="center"> <font size="4" color="#800000"> <a target="_blank" href="downloads/booking%20terms%20&%20conditions.pdf"> <font color="#800000">Booking Terms & Conditions</font></a></font></p>-----------------------------------------------------------------------------------------------------------------------------

Link to comment
Share on other sites

When the link is currently clicked it just opens the file in an IE Explorer window without giving the option to save it.
I remember that PDF is free online document , so choice to save or open is ... free too :)
How about just telling them to click "Save As" or simple compress the file?
no, that not work
Link to comment
Share on other sites

You can create or get a php script for that, go here:http://nl3.php.net/manual/en/function.header.php

<?php// We'll be outputting a PDFheader('Content-type: application/pdf');// It will be called downloaded.pdfheader('Content-Disposition: attachment; filename="downloaded.pdf"');// The PDF source is in original.pdfreadfile('original.pdf');?>
This will always get the download dialogbox open. :) (should)
Link to comment
Share on other sites

That will not open the download box, if the Acrobat plugin is installed it will still open it in the browser because the mime type is set to PDF. If you set the mime type to application/octet-stream instead, it will always force a download box.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...