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 Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/9435-image-upload-and-overwrite/#findComment-34805 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.