How to increment filename in php to prevent duplicates
<p>In many situations, we need to make the filename different on the server when creating them to prevent duplication. And the most common answer to that seems to be, append the timestamp at the end or store the filename in the db and use those stored values to compute new name. These are good and all, but, appending a long time-stamp isn't always very user-friendly, and storing in the db isn't always an option. So, how can we auto-increment a standard filename while creating it via php?</p>
