nihilism machine wrote:
any idea why this fails?this is the error: "Sorry, there was a problem uploading your file"

It can't move the file to the $target location, or maybe the file wasn't uploaded properly in the first place.

What's in $_FILES['uploaded']['error'] ?

http://www.php.net/manual/en/features.file-upload.errors.php

if (move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) {
    // Error
    echo "File was uploaded!";
} else {
    echo "Sorry, there was a problem uploading your file.";
}

chmod($target, 0755);

Files do not need to be 0755, they should be 0644 unless you want them to actually run something (eg they are a shell script or perl script that you'd run from the cmd line).

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to