php 生成唯一标识
function uuid( $more = true, $admin = false )
{
if ( $more )
{
return uniqid( md5( mt_rand() ), true );
}
else
{
if ( $admin ) return uniqid( "zzz", false );
return uniqid( create_guid_section( 3 ), false );
}
}
function create_guid_section( $characters )
{
$return = "";
for ( $i = 0; $i < $characters; $i++ )
{
$return .= dechex( mt_rand( 0, 15 ) );
}
return $return;
}