Help On File upload

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anirbanb2004
Forum Newbie
Posts: 23
Joined: Sun Oct 15, 2006 4:21 pm

Help On File upload

Post by anirbanb2004 »

Hi,
I am new to PHP and realy amazed by its beauty.
really found problem in fileuploading.
It is giving permision denied or path not found..

Please give me a suggestion and/or a sample example if possible.

Thanking you very much
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

anirbanb2004
Forum Newbie
Posts: 23
Joined: Sun Oct 15, 2006 4:21 pm

DID it..

Post by anirbanb2004 »

hi,
I have seen it.
The same problem....is it required to give the ful path for destinition folder...
My destinition folder is in same directory as the file..
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

anirbanb2004 wrote:The same problem....is it required to give the ful path for destinition folder...
You mean the parameters for move_uploaded_files?
anirbanb2004
Forum Newbie
Posts: 23
Joined: Sun Oct 15, 2006 4:21 pm

Post by anirbanb2004 »

No..for...$uplopaddir
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

then I don't know what you're talking about. Please elaborate.
anirbanb2004
Forum Newbie
Posts: 23
Joined: Sun Oct 15, 2006 4:21 pm

Post by anirbanb2004 »

my file upload.php is in /www directory...
there is another directory image location...is /www/image
I want to upload files to image directory.

now what will be the code??
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You call a function to move or copy the file. Is this function move_uploaded_file?
The destination path can either be absolute (/www/image/filexyz.ext) or relative (no leading /).
The leading / in absolute paths point to the local filesystem's root directory (which is usually not the document_root of the webserver).
Relative paths are relative to the current working directory, see http://de2.php.net/getcwd
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

anirbanb2004, post code for further assistance.
I am new to PHP and realy amazed by its beauty.
It's really not. I go to a lot of time and effort to make my PHP code beautiful and to do this requires a great deal of knowledge. By default PHP is not beautiful and in the hands of 96% (I'd say) of those who write PHP, PHP is ugly to horrific.
Post Reply