1

嗨,我已经为我的项目制作了这段代码。

uniqid().date('ymdhis').rand();

这有多独特?

它是否足够独特以防止任何可能的碰撞?即使对于每天提交的文件数量天文数字的大型网站?

还是我应该添加更多功能?(我不想,因为输出已经很长了。)

谢谢。

4

1 回答 1

1

Depending on what language you are using (i assume it is php) it is more then enough.

uniqid() is a command that generates a id based on a timestamp, making sure that it won't output a string twice. so only the uniqid() would already suffice

于 2012-04-22T20:09:16.843 回答