|
|||||||
| General Discussion and support for your general issues associated with web design. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to download directly a file?
Hi!
How can i make a file to be downloaded after being generated by php for example? The thing is that i have a mailing list integrated in my site and i want to be able to export the mails that i have in the database. How can i make a window appear to download that file after i get them from the database? Many thx
__________________
www.imaginando.net |
|
#2
|
||||
|
||||
|
what format are the file?
text, is it? |
|
#3
|
||||
|
||||
|
Code:
<?php
header('Content-Disposition: attachment; filename="file.txt"');
?>
Will make file.txt downloadable when linked from the current page instead of it being displayed in the browser.
__________________
Stephen Free Computer Help, blog, forum Web design ebooks and software JavaScript scripts and tutorials |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|