User upload file problem

Discussion in 'Linux VPS/Dedicated - cPanel' started by bru, Jul 27, 2008.

  1. bru

    bru New Member

    Hello everybody:
    I'm trying to let my users upload their images on my site, but when I run my script, I get the following message:

    "Warning: copy(images/1217191458.jpg) [function.copy]: failed to open stream: No such file or directory in /home/xxx/public_html/upload/upload_image.php on line xx"

    This is the script (abbreviated):




    echo "NEWNAME: ".$newname."<br />";

    $copied = copy($_FILES['image']['tmp_name'], $newname);
    if (!$copied)
    echo '<h1>Copy unsuccessfull!</h1>';

    how does it finds the file? Thank you.

  2. Jeren

    Jeren Time Lord

Share This Page