|
Posted by Tim Roberts on 12/25/07 06:15
Dev <hanudev@gmail.com> wrote:
>
>i am unable to upload file using following code:
>
>chmod("upload", 0777);
>move_uploaded_file($_FILES["file"]["tmp_name"], "./upload/".
>$_FILES["file"]["name"]);
>chmod("upload", 0755);
>
>what wrong in this code any one help me.
Does the Apache user have write permission in the directory containing
"upload"? If not, you won't be able to chmod the directory. And if
"apache" IS the owner, then you probably don't need it.
What are you trying to protect here? Why don't you just set the
permissions to 775 and have the group be the Apache group?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
[Back to original message]
|