File uploading script to /var/www/html -- SOLVED
Posted: Thu Nov 09, 2006 8:41 pm
I have a short script to upload one file at a time to a web document directory, using the following syntax:
Maybe I'm misinterpreting the error message. Anyone see what's happening?
TIA,
Don
$target is a path within the /var/www/html/... part of the file system. I have made sure that the target directory has a file mode of drw-rw-rw- and I thought that I should be able to write the file there, since it's writable by the world (I know, it sounds dangerous, but I don't think it is for this special application) but I get:move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)
I had previously tried locating the upload directory outside the Apache document root, but I got the same error when I did that.Warning: move_uploaded_file(/var/www/html/uploads/horiz2.gif) [function.move-uploaded-file]: failed to open stream: Permission denied
Maybe I'm misinterpreting the error message. Anyone see what's happening?
TIA,
Don