
December 28th, 1999, 06:58 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Best is to move your file in a non-temp location after it's been uploaded... Something like with the following code...
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>if (!file_exists( "/destination_directory/$filename")) {
copy($file, "/destination_directory/$filename");
} else {
echo( "I'm sorry but your file name is already in use, please try another.");
unlink($file); //deletes the temp file if it cannot be copied to destination
exit;
}
unlink($file); //deletes the temp file after a succesfull copy to the destination
if (!file_exists( "/destination_directory/$filename")) {
echo( "Sorry but your file did not upload for some reason, please try again."); //makes sure the file is actually there...
exit;
}[/quote]
I hope this helps!
-Tricord
BELGIUM
URL
[This message has been edited by Tricord (edited 12-28-99).]
|