#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    1
    Rep Power
    0
    hey there,

    can anyone tell me how to download a file with php3 onto the server?

    thx
    jds
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    38
    Rep Power
    15
    the easiest way i've found if you just want to use php....go look on freshmeat.net for the "phpfileupload.class"
    it comes with plenty of instructions and makes it nice and easy
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    I assume you mean upload in this response. Here's a page that's 1/2 mine and 1/2 a million other programmers... it's where I started

    <?php

    if ($Form_send_button)
    {
    set_time_limit(60);
    print ($Form_file_up);
    # print ("The file type is :" . filetype(basename($Form_file_up)));
    $path1 = "C:/windows/temp/";
    $dest = $path1 . $Form_file_up_name;
    # print ("The uploaded path is $dest");
    if(copy($Form_file_up,$dest))
    { // copy the file from the temp directory to the upload directory, and test for success
    echo "$dest has been uploaded<br>n";
    }
    else
    {
    echo "Upload directory not write-enabledn"; // you need to write-enable the upload directory // set flag
    }
    }
    ?>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <html>
    <head>
    <title>Untitled</title>
    </head>

    <body>
    <FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="LibUpload.php3">
    <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10485760">
    Send this file: <INPUT NAME="Form_file_up" TYPE="file">
    <INPUT TYPE="submit" VALUE="Send File" name='Form_send_button'>
    </FORM>



    </body>
    </html>

Similar Threads

  1. Downloading a file from an HTTP Server
    By TJEr in forum ASP Programming
    Replies: 5
    Last Post: January 5th, 2006, 08:35 PM
  2. Pointer problem in opening a file
    By LAKI in forum C Programming
    Replies: 13
    Last Post: February 11th, 2004, 08:27 AM
  3. Pointer problems opening file *formatted*
    By LAKI in forum C Programming
    Replies: 4
    Last Post: February 11th, 2004, 06:06 AM
  4. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 07:42 PM
  5. Downloading a file from a folder above webroot
    By EasyMeat in forum ASP Programming
    Replies: 3
    Last Post: January 28th, 2004, 05:30 PM

IMN logo majestic logo threadwatch logo seochat tools logo