Ismael wrote:
Hello all,
I know this more a javascript rather than a php problem,
but i searched internet and couldn't find an answer.
Here it is : I simply want to know how to open a "Open File"
or "Save File" box, after clicking an html button.
I'm sure it's a three-lines-of-code problem :)
Which class implements this ?
To upload a file (get the "Open file" dialog) you place a form on your
page with an <input type="file">.
To force the browser to show a "Save file" dialog rather than
displaying/opening the requested file you have to send an according
mime-type within the HTTP header. This you can do with PHP:
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="myfile.txt"');
Regards
--
brotherli
[ mails to
nu**@brotherli.ch won't be read! replace nugs with endless. ]