/** * 32位UUID * @return string uuid */ function util_uuid(){ if(function_exists('com_create_guid')){ return str_replace('-', '', substr(com_create_guid(), 1, 36)); }else{ mt_srand((double)microtime()*10000); $uuid = strtoupper(md5(uniqid(rand(), true))); return $uuid; } }