users@glassfish.java.net

Re: .tmp files under /var/tmp

From: <glassfish_at_javadesktop.org>
Date: Fri, 16 Jul 2010 21:20:48 PDT

Warning: move_uploaded_file(uploads/r.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /Library/WebServer/Documents/test/_notes… on line 6

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/private/var/tmp/phpNvqSTr' to 'uploads/r.jpg' in /Library/WebServer/Documents/test/_notes… on line 6

PHP gave me this error, i already try chmod my web root to 777, but what does this really mean?

SEE THE CODE of upload.php:

<?php
$target_path = "uploads/";

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);

if(move_uploaded_file($_FILES['uploade… $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
?>




____________________________________
[url=http://www.officechairsuk.com/acatalog/Herman_Miller_Products.html]Herman Miller[/url]|[url=http://www.officechairsuk.com/acatalog/Herman_Miller_Products.html] Herman Miller Chairs[/url]
[Message sent by forum member 'cena2020']

http://forums.java.net/jive/thread.jspa?messageID=477850