Posted by Oli Filth on 09/28/25 11:41
Kevin Marks wrote:
> I am working on a photo gallery. Photos are uploaded into the "originals"
> directory.
> They have random names given by the digital camera.
> Is there a way to take every file in that directory (there are a couple
> hundred) and rename it?
>
Yes: a combination of readdir(), is_file() and rename() should do the
trick, assuming you're set up with the correct permissions. See the
PHP manual for details on each of these functions.
--
Oli
[Back to original message]
|