ʹÓÃphpÉú³ÉÈ«ÇòΨһ±êʶ·û(GUID)µÄ·½·¨
±¾ÎĽéÉÜÏ£¬phpÉú³ÉGUID£¬¼´È«ÇòΨһ±êʶ·ûµÄ·½·¨£¬ÓÐÐèÒªµÄÅóÓѲο¼Ï¡£
GUID£º ¼´Globally Unique Identifier(È«ÇòΨһ±êʶ·û) Ò²³Æ×÷ UUID(Universally Unique IDentifier) ¡£
GUIDÊÇÒ»¸öͨ¹ýÌض¨Ëã·¨²úÉúµÄ¶þ½øÖƳ¤¶ÈΪ128λµÄÊý×Ö±êʶ·û£¬ÓÃÓÚָʾ²úÆ·µÄΨһÐÔ,GUID Ö÷ÒªÓÃÓÚÔÚÓµÓжà¸ö½Úµã¡¢¶ą̀¼ÆËã»úµÄÍøÂç»òϵͳÖУ¬·ÖÅä±ØÐë¾ßÓÐΨһÐԵıêʶ·û¡£
ÔÚ Windows ƽ̨ÉÏ£¬GUID ¹ã·ºÓ¦ÓÃÓÚ΢ÈíµÄ²úÆ·ÖУ¬ÓÃÓÚ±êʶÈçÈç×¢²á±íÏî¡¢À༰½Ó¿Ú±êʶ¡¢Êý¾Ý¿â¡¢ÏµÍ³Ä¿Â¼µÈ¶ÔÏó¡£
GUID µÄ¸ñʽΪ¡°xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx¡±£¬ÆäÖÐÿ¸ö x ÊÇ 0-9 »ò a-f ·¶Î§ÄÚµÄÒ»¸ö32λʮÁù½øÖÆÊý¡£
ÀýÈ磺6F9619FF-8B86-D011-B42D-00C04FC964FF ¼´ÎªÓÐЧµÄ GUID Öµ¡£
GUIDÔÚ¿Õ¼äÉϺÍʱ¼äÉϾßÓÐΨһÐÔ£¬±£Ö¤Í¬Ò»Ê±¼ä²»Í¬µØ·½²úÉúµÄÊý×Ö²»Í¬¡£
ÊÀ½çÉϵÄÈκÎÁ½Ì¨¼ÆËã»ú¶¼²»»áÉú³ÉÖظ´µÄ GUID Öµ¡£
ÐèÒªGUIDµÄʱºò£¬¿ÉÒÔÍêÈ«ÓÉËã·¨×Ô¶¯Éú³É£¬²»ÐèÒªÒ»¸öȨÍþ»ú¹¹À´¹ÜÀí¡£
GUIDµÄ³¤¶È¹Ì¶¨£¬²¢ÇÒÏà¶Ô¶øÑԽ϶ÌС£¬·Ç³£ÊʺÏÓÚÅÅÐò¡¢±êʶºÍ´æ´¢¡£
´úÂëÈçÏ£º
<?php //phpÉú³ÉGUID function getGuid() { $charid = strtoupper(md5(uniqid(mt_rand(), true))); $hyphen = chr(45);// "-" $uuid = substr($charid, 0, 8).$hyphen .substr($charid, 8, 4).$hyphen .substr($charid,12, 4).$hyphen .substr($charid,16, 4).$hyphen .substr($charid,20,12); return $uuid; } ?>
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ