首页 > uuid

PHP生成不重复的随机UID,UUID,GUID

<?php function create_guid(){ $charid = strtoupper(md5(uniqid(mt_rand(), true))); $uuid = substr($charid, 0, 8).'-'.substr($charid, 8, 4).'-' .substr($charid,12, 4).'-'.substr($charid,16, 4).'-' .substr($charid,20,12); return $uuid; } ?> 可以生成全球唯一不会重复的UUID序号。

最近回复

标签