Problem with uploading a large size file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim

    Problem with uploading a large size file

    I meet problem on uploading a file with a large file size.
    Below is my code, how can I modify in order to be able to upload a
    large file successfully ? Thank for your help.

    upload.html:
    <html>
    <body><br><br>< center>
    <form action="upload. php" method=post enctype="multip art/form-data">
    File upload: <input type=file name="userfile" >
    <input type=submit value="send"><b r> </form>
    </center></body> </html>


    upload.php:
    <?
    $realname = $HTTP_POST_FILE S['userfile']['name'];
    print "<br><br>";
    if (is_uploaded_fi le($HTTP_POST_F ILES['userfile']['tmp_name'])){
    copy($HTTP_POST _FILES['userfile']['tmp_name'],
    "/mnt/flash/song/$realname");
    echo "Upload Filename: " . $HTTP_POST_FILE S['userfile']['name'];
    }
    else{
    echo "Upload not complete";
    }
    print "<a href='upload.ht ml' target='mainF'> Continue to
    upload</a>";
    ?>
  • Andy Hassall

    #2
    Re: Problem with uploading a large size file

    On 20 Mar 2004 08:43:31 -0800, tim_li1008@sina man.com (Tim) wrote:
    [color=blue]
    >I meet problem[/color]

    What problem?
    [color=blue]
    > on uploading a file with a large file size.[/color]

    How large?
    [color=blue]
    >Below is my code, how can I modify in order to be able to upload a
    >large file successfully ? Thank for your help.[/color]



    --
    Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
    http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

    Comment

    • Garp

      #3
      Re: Problem with uploading a large size file


      "Tim" <tim_li1008@sin aman.com> wrote in message
      news:e5ae706f.0 403200843.6c4d6 70a@posting.goo gle.com...[color=blue]
      > I meet problem on uploading a file with a large file size.
      > Below is my code, how can I modify in order to be able to upload a
      > large file successfully ? Thank for your help.
      >[/color]
      <snip>

      Check your php.ini and look for something like:
      ; Maximum allowed size for uploaded files.
      upload_max_file size = 2M

      If you're having problems with file above 2Mb, that'll be it (since you
      haven't restricted upload size through the browser in the form:
      <input type="hidden" name="MAX_FILE_ SIZE" value="100000" />
      which is defeatable anyway).

      Garp


      Comment

      Working...