Jump to content

[SOLVED] very easy file uploading question


nilsk123

Recommended Posts

I have a very basic file uploading script, as you can see it will always rename the uploaded file to the same name, its meant to be that way. However, I want it to overwrite the old file when a new one is uploaded. Now it always ignores the request because the file is allready there. How would this be accomplished?

 

<?PHP

$target = "upload/verkoopcijfers.mht";

if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))

{

echo "Het bestand is succesvol geupload.";

}

else {

echo "Er was een onverwacht probleem tijdens het uploaden van het bestand, probeer het aub opnieuw.";

}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.