You are here: Re: file upload « PHP Programming Language « IT news, forums, messages
Re: file upload

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация