move_upload_file function problem

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
igi
Forum Newbie
Posts: 2
Joined: Wed Sep 12, 2007 3:08 am

move_upload_file function problem

Post 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..
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post by aceconcepts »

What error do you get?

And can you show you form and code?
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post by vinoth »

Check your form,
If you added

Code: Select all

enctype="multipart/form-data"
to the form or not
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

sunnyverma1984
Forum Newbie
Posts: 3
Joined: Mon Sep 10, 2007 10:04 am
Contact:

Post by sunnyverma1984 »

try
move_file_upload("/tmp/igi.jpg","igi.jpg");


move_uploaded_file ( string $filename, string $destination )
igi
Forum Newbie
Posts: 2
Joined: Wed Sep 12, 2007 3:08 am

Post by igi »

there no error i got.return value is false.when i execute in windows platform, it was success.
cade
Forum Commoner
Posts: 55
Joined: Tue Jul 03, 2007 8:18 pm

Post 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
Post Reply