Results 1 to 6 of 6

Thread: How to "move" a file

  1. #1
    Join Date
    Aug 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to "move" a file

    Hi to all,

    I'm making a site with session security and I want my users to upload and then download a file of any type(*.doc, *.rtf, *.wma, *.txt, *.mp3, *.mp4, *.php, *.html, e.t.c.). I've done so far the uploading but I'm stuck with the downloading! I used the "<a href=''>" but didn't work! Now, I'm trying to "upload" it again in the user's computer but I can't get it work!! The error says that "The Browser does not know what to do with this file". Any help would be appreciated!!

    Thanks in advance!!

    Costas

    A Note: It works if I right-click on the link and open it in a new window! I made it to open in a new window (in the code), but again nothing!
    Last edited by costas; 10-18-2006 at 01:56 PM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Can't do anything without more info, a link, and/or the code
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for answering! Well, here's the part of my code(in php) that doesn't work:

    Code:
    while(is_string($w))
    {
    if($w)
    {
    $msg .= "<a href=\"C:\files\\$w\" target=\"_new\" type=\"--don't know what type to write--\">$count.$w</a><br><br>";
    $count++;
    }
    $w = strtok(";");
    }
    $msg .= "</p>";
    I want a type that always pops up the download dialog(and then download the file) without checking what the type of the file is, if there's one that does so. I've searched through some web pages with that information(media types), but I can't find anything!

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I'm fairly (if not totally) sure that type isn't an attribute of the <a> element.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Aug 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Could you tell me where this type goes?
    Does it go in the start, where we write "<meta http-equiv="Content-type" content="text/html"; <- does it go here?? -- charset=iso-8859-1" />"! Please, I need some help!!

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It doesn't go in the HTML, it should be sent by the server as a header with the file itself.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •