kristofor Posted May 10, 2006 Share Posted May 10, 2006 Hi,I have a customer who runs a compeptition and they have 2 monthly winners. Each month they want to upload 2 new images to replace the old images, now in interest of saving space on the web server, I need to be able to upload the new images and have them take the same file name as the old image and pretty much just overwrite the old image.How would I go about overwriting the old image with the new image keeping the same filename??Any help would be greatly appreciated.ThanksKris Link to comment https://forums.phpfreaks.com/topic/9435-image-upload-and-overwrite/ Share on other sites More sharing options...
akitchin Posted May 10, 2006 Share Posted May 10, 2006 straight from the horse's mouth (ie. php manual):[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]WarningIf the destination file already exists, it will be overwritten. [/quote]problem solved - use move_uploaded_file(), which you should be using anyhow, with a static filename and you're all set. Link to comment https://forums.phpfreaks.com/topic/9435-image-upload-and-overwrite/#findComment-34805 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.