Page 1 of 1

upload problem

Posted: Tue May 30, 2006 1:01 pm
by Milan
I have the following code:

Code: Select all

copy($_FILES["filename"]["tmp_name"],"./".$_FILES["filename"]["name"]) or die("<b>Unknown error!</b>");
but it wont upload my image, i always get "Unknown error", i do have read/write access, path is ok and input type is "file"

Does anyone know another good way to upload a file?

thanks!

Posted: Tue May 30, 2006 1:08 pm
by tecktalkcm0391
yes i think the path that your storing the files needs to be able to read/write by everyone inorder for this to wokr

Posted: Tue May 30, 2006 1:15 pm
by Christopher
There is also the function move_uploaded_file() specifically for this.

Posted: Tue May 30, 2006 1:16 pm
by Milan
I know i am a pain in the ass, but gave you give me an example with it?

Posted: Tue May 30, 2006 6:03 pm
by PrObLeM
Milan wrote:I know i am a pain in the ass, but gave you give me an example with it?
did you look at the User Contributed Notes on the manual, heck even google it?

Posted: Tue May 30, 2006 6:04 pm
by Milan
Yes, and i still have the same probem,

i have tried over 15 methods so far.

Posted: Wed May 31, 2006 3:15 am
by twigletmac
What's the lastest code you've tried?

Mac