Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

download pdf instead of open?

Status
Not open for further replies.

Hondy

Technical User
Joined
Mar 3, 2003
Messages
864
Location
GB
Hi

Is there some way to tag a link so that when a user clicks it the file is saved to disk rather than tries to open it? I suppose this could apply to any file but I'm interested in PDF this time. I guess I could ZIP it, is this the way to do it? I'd like to avoid instructions to "Right click.. Save link..As" because different browsers may do this differently.

I know you can do it at browser level but i'd like to to it at web page level is it possible?

Thanks
 
I think you'll want to take a look at the PHP online manual page for header(). Look for the string "Content-Disposition" in the example code on that page.


Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top