Headers: Force Save

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lldcrb328
Forum Newbie
Posts: 3
Joined: Wed Feb 04, 2009 3:33 pm

Headers: Force Save

Post by lldcrb328 »

Hi All..

I'm using the following script to give the option to either "SAVE" or "OPEN" a file, via headers() function.
I'd like disable the "OPEN" option -- does anybody know if this is possible? So that the script only offers the option of saving the document...


Thanks for all your help !
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Headers: Force Save

Post by requinix »

Not possible.

In general you can't force the browser to do anything. Save a file, open a file, print a document...
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Headers: Force Save

Post by pickle »

The best you can do is pop up that box asking the user what to do.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply