I have image uploaded on the server with the id of customer. But I don't want to upload multiple format of files twice (e.g. there should be only one image for customer id=1 that is 1.jpg OR 1.png)
How can I check globally while updating image whether that file is already there or not?
can I check file exist without extension of file?
I am using this command to check file.
file_exists('./media/customer-id/'.$cus_id);