Hi,
I am creating code to upload images in a folder using PHP, & before upload an image I check that if any image with same name already exists in the folder by using below syntax:
if (file_exists('profilephoto/' . 'frame.gif')) {
}
But actually I don't want to restrict the user to upload more images with same name & obviously it is impossible to save two images with same name , but there is a way to just find total number of images with same name & upload the next image with appending total number + 1 with image name.
Now I just want to know that using PHP how could we find total number of images having same name in a folder?
Thanks.