Reply to Re: file upload

Your name:

Reply:


Posted by My Pet Programmer on 12/24/07 04:10

Dev said:
> Hello All,
>
> 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.
>
> Thanks in advance
>
> Dev

I doubt your PHP process has root access to your server. You'll need to
either change the permissions on the directory you're uploading to
manually outside the program of write a shell script that does it and
call that from PHP, then write another one that locks it back up and
call it from PHP as well, but I'm not even sure that would work, unless
you su'd first, which I don't think I would ever consider doing from PHP.

~A!

[Back to original 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

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