|
-
Jul 20th, 2008, 04:40 AM
#1
Thread Starter
PowerPoster
[RESOLVED] Open/Save Dialog Box
I currently use the below to open a selected file but instead of the file opening in the browser (which it now does) I want to display the default browser open/save dialog box. I presume I may have to add additional headers?
PHP Code:
header("Location: $openfile");
-
Jul 20th, 2008, 08:15 PM
#2
Re: Open/Save Dialog Box
instead of Location, try:
PHP Code:
header('Content-disposition: attachment'); header('Content-type: mime/type'); header('Content-length: '.filesize($openfile)); readfile($openfile);
Replace mime/type with the correct MIME type of the file.
-
Jul 21st, 2008, 04:52 AM
#3
Thread Starter
PowerPoster
Re: Open/Save Dialog Box
Thanks pengate, got it working
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|