Results 1 to 8 of 8

Thread: [Resolved] Upload error

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Resolved [Resolved] Upload error

    <?php
    $directory = '/public_html/';
    echo "user file = $userfile<br>\n";
    echo "user file name = $userfile_name<br>\n";
    echo "user file size = $userfile_size<br>\n";
    echo "user file type = $userfile_type<br>\n";

    if (!copy($userfile, $directory.$userfile_name)) {
    print("failed to copy $userfile...<br>\n");
    }
    if ( $userfile_type == 'text/plain' ) {

    }
    else if ( ($userfile_type == 'image/pjpeg') ||
    ($userfile_type == 'image/bmp') ||
    ($userfile_type=='image/gif') ) {
    echo "<img src=images/$userfile_name><br>\n";
    }
    ?>


    -------------------------------------

    user file = /tmp/phpC48Bsi
    user file name = hp.txt
    user file size = 15230
    user file type = application/octet-stream

    Warning: copy(/public_html/hp.txt): failed to open stream: No such file or directory in /home/ebay555/public_html/fileupload.php on line 8
    failed to copy /tmp/phpC48Bsi...


    what am i mistake?

    thanks
    Last edited by naruponk; Jun 18th, 2005 at 10:04 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width