View Single Post
Old 02-06-2022, 11:24 AM  
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,196
Image rename upon upload of duplicate file name?

Quote:
// Check if file already exists
if (file_exists($target_file)) {
//echo "Sorry, file already exists.";
//$uploadOk = 0;
rename($target_file, 'your_new_filename');
}
This is working however, its not creating a clickable image when I browse the image upload directory, could anyone point me in the right direction about how to get it to rename AND be a valid clickable image please when viewed in the directory itself?

I've tried this, which i thought would work but didnt:

[quote]
$imageFileType rename(2.'$imageFileType');
[quote]

__________________
Extreme Link List - v1.0
Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote