Actually I'm using uniqid(); to generate random names:
$file = UPLOAD_DIR . uniqid() . '.png';
The output looks like:
53bd02cdc6b9b.png
53bd02cdc6bd8.png
53bd0320aafbc.png
53bd0320aaff7.png
53bd03e89b8df.png
I want to change these names each file as output:
picture_0001.png
picture_0002.png
picture_0003.png
picture_0004.png
picture_0005.png
Do you have better ideas?
See Question&Answers more detail:os