Page 1 of 1

Move Uploaded file Permission Problem

Posted: Sun Dec 03, 2006 7:16 am
by danrah
I upload my files correctly( error code is 0 )
but when i want to move uploaded files using move_uploaded_file :
$uploaded=move_uploaded_file($_FILES['image']['tmp_name'],"pics");
the following error occurs:
failed to open stream: Permission denied
i am using windows so i checked the folder and unsetted read-only but the problem still persists.
what should i do?

Posted: Sun Dec 03, 2006 7:39 am
by feyd
Which one had permission denied?

Is "pics" a directory? You need to give a filename in the destination too.

Posted: Sun Dec 03, 2006 8:16 am
by danrah
yes it is a directory
am i using move_uploaded_file correctly?

Posted: Sun Dec 03, 2006 8:18 am
by feyd
danrah wrote:yes it is a directory
am i using move_uploaded_file correctly?
Outside of the previously noted "you need to give a filename in the destination too," yes.

Posted: Sun Dec 03, 2006 8:22 am
by ok
Post the part of the script handling the upload.