Page 1 of 1

move_upload_file function problem

Posted: Wed Sep 12, 2007 3:34 am
by igi
i used php 5, myserver is fedora core 5.i write some code like
move_file_upload("igi.jpg","/tmp/igi.jpg");

but, the file cannot sent to server. have change php.ini of line upload=On.i have change the /tmp permission to 777.can anybody resolve my problem ?

thx..

Posted: Wed Sep 12, 2007 3:44 am
by aceconcepts
What error do you get?

And can you show you form and code?

Posted: Wed Sep 12, 2007 5:44 am
by vinoth
Check your form,
If you added

Code: Select all

enctype="multipart/form-data"
to the form or not

Posted: Wed Sep 12, 2007 8:29 am
by superdezign

Posted: Wed Sep 12, 2007 11:56 am
by sunnyverma1984
try
move_file_upload("/tmp/igi.jpg","igi.jpg");


move_uploaded_file ( string $filename, string $destination )

Posted: Wed Sep 12, 2007 8:57 pm
by igi
there no error i got.return value is false.when i execute in windows platform, it was success.

Posted: Tue Sep 25, 2007 8:35 pm
by cade
how to make every file uploaded is unique? I dont want when user upload file to server with the same name, the files will automatically replace the old files on the server with the same name