Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Exclamation trouble with download code

    Having trouble with a basic download code for a zip file on my website (to let others download a file). It worked before, but this is a new server. I use:


    <a href="http://www.my website name/file name.zip">download name</a>


    What am I doing wrong? Can anyone help me??

  • #2
    New Coder
    Join Date
    Apr 2010
    Location
    Norfolk, England
    Posts
    63
    Thanks
    1
    Thanked 14 Times in 14 Posts
    Hi killjoy

    I know that is an example file path, but spaces in file names may prevent it downloading, you should always use camelCase or underscores

  • #3
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    sam,

    Thanks, but it turns out there was no problem with my code (btw, there were no spaces - you're right, that was just an example) ..... the problem was with the server. Everything's working fine now.


    Now I want to upload wordpad files that people can download from my site. I think all I have to do is upload them and then simply add the .rtf extension to the download code.

    Thanks again.

  • #4
    New Coder
    Join Date
    Apr 2010
    Location
    Norfolk, England
    Posts
    63
    Thanks
    1
    Thanked 14 Times in 14 Posts
    Quote Originally Posted by killjoy View Post
    sam,

    Thanks, but it turns out there was no problem with my code (btw, there were no spaces - you're right, that was just an example) ..... the problem was with the server. Everything's working fine now.
    Glad to hear it

    Quote Originally Posted by killjoy View Post
    Now I want to upload wordpad files that people can download from my site. I think all I have to do is upload them and then simply add the .rtf extension to the download code.
    Well, without a PHP downloading script, when you link to files, what occurs (whether it simply downloads or loads in the browser) depends on the user computer. For example, if I put a link to an image, on my computer it wont download the image becuase the web browser can show it.

    As you linked to a ZIP file, the browser can't open that, so puts it as a download

    As for .rtf not sure if you can open them in browser, but can always put each in a zip file to be sure

    Good luck.


  •  

    Posting Permissions

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