Results 1 to 3 of 3

Thread: download using php

  1. #1
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile download using php

    hi.... i created one link that is <a href="#">download file</a>
    if user click on download file then download window should come or file should start to download ...
    so how can i do this ...

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    If you specifically want to force downloads of certain file types with PHP, have a look in to headers: https://www.google.co.uk/#q=php+headers+force+download

    Alternatively (and usually easiest to guarantee getting around firewalls) is to just zip what ever you want to provide as a download. That should always prompt a download/save as dialogue window and you can keep using the standard hyperlink without any extra code.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    I have this tutorial on the subject.
    http://amecms.com/article/PHP-Force-...File-Whitelist
    You never know everything, I learn everyday!

Similar Threads

  1. Download page help! (download.php)
    By Patel123 in forum PHP
    Replies: 4
    Last Post: 01-29-2010, 01:49 PM
  2. Popup File download window that closes when download button clicked
    By amccann in forum Looking for such a script or service
    Replies: 5
    Last Post: 10-27-2007, 01:37 PM
  3. Download
    By Aidanx in forum The lounge
    Replies: 1
    Last Post: 05-07-2007, 03:45 PM
  4. How can I download this?
    By Jack in forum The lounge
    Replies: 12
    Last Post: 10-06-2006, 06:31 PM
  5. Mp3 Download
    By Sambo in forum HTML
    Replies: 1
    Last Post: 06-24-2005, 04:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •