How to create downloadable link to text file?

The purpose is to download the dumped backup.sql file after running the sql dumping script (from PHP). Normally, the dumped .sql file is outputted (written) on the server. Then when i make a href link to that file like Download File, the file is opening inside the browser on clicking, instead of being downloading.

  • i just want to make a simple HREF LINK (to such a text file) which show up with "Save as.. " dialog on simple Left Click.

How it could be done?

8
задан 夏期劇場 10 February 2012 в 10:19
поделиться