|
PHP5中文手册
uniqid(PHP 4, PHP 5) uniqid — Generate a unique ID 说明
string uniqid
([ string $prefix
[, bool $more_entropy
]] )
Gets a prefixed unique identifier based on the current time in microseconds. 参数
返回值Returns the unique identifier, as a string. 范例If you need a unique identifier or token and you intend to give out that token to the user via the network (i.e. session cookies), it is recommended that you use something along these lines: This will create a 32 character identifier (a 128 bit hex number) that is extremely difficult to predict. Example#1 uniqid() Example
<?php 更新日志
|