move_uploaded_file() speed

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
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

move_uploaded_file() speed

Post by icesolid »

Is move_uploaded_file(); the fastest way for uploading multiple files?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

just as fast as you can get
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Post by icesolid »

copy isn't faster?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

copy() and move_uploaded_file() are, for all practical purposes, the same, except move_uploaded_file() is specifically for uploaded files. copy() will incur an error when you are running in safe_mode, most likely.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Just for clarification: When your script calls copy() or move_uploaded_file() for anything that it finds in $_FILES the actual upload client->server already took place, i.e. the data is already on the server and php stored it in temporary files.
Post Reply