File download dialog box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ak1dnar
    Recognized Expert Top Contributor
    • Jan 2007
    • 1584

    File download dialog box

    Hi,
    How to display a file download dialog box using PHP. is there any header for this.
    Currently i have uploaded some .pdf and .doc files to the web site.
    Now i need to give the download links to the users. i can make the script to get the path of the files.

    http://www.mydomain.co m/file_folder/any_file.pdf

    i can make the links like this, but the problem is then these pdf files will open with the browser window.Not a download dialog box.
  • merseyside
    New Member
    • Mar 2007
    • 48

    #2
    Yes, it is the header function. Could I suggest http://uk2.php.net/manual/en/function.header.php , has many examples of what you're trying to achieve. I've used those methods in enabling the user to download a CSV file, created by a PHP script.

    Comment

    • lorener
      New Member
      • Mar 2007
      • 3

      #3
      Hi

      It is true pdf file wil automatically open the by ur browser...What you can do is rename the extension .pdf to .zip and it will download the file and the dialog box but make sure that you inform the user once downloaded rename it back to .pdf...just another idea

      lorener...

      p.s

      Is there anyone can share an email form with file attachement in flash?

      Comment

      • ak1dnar
        Recognized Expert Top Contributor
        • Jan 2007
        • 1584

        #4
        Originally posted by lorener
        Hi

        It is true pdf file wil automatically open the by ur browser...What you can do is rename the extension .pdf to .zip and it will download the file but make sure that you inform the user once downloaded rename it back to .pdf...just another idea

        lorener...

        p.s

        Is there anyone can share an email form with file attachement in flash?
        Read this Thread Buddy,I have already made it. Nothing is Impossible.Simp le Bugs are there to Fix.
        Now i am working on.

        Comment

        • ak1dnar
          Recognized Expert Top Contributor
          • Jan 2007
          • 1584

          #5
          Originally posted by merseyside
          Yes, it is the header function. Could I suggest http://uk2.php.net/manual/en/function.header.php , has many examples of what you're trying to achieve. I've used those methods in enabling the user to download a CSV file, created by a PHP script.
          Thanks for the Link. Please Read This Thread . Have you tried to Trap the Error message in your CSV download Script.

          Comment

          Working...