function

uuid(){

$chars = md5(uniqid(mt_rand(),

true

));

$uuid = substr($chars,0,8) .

'-'

;

$uuid .= substr($chars,8,4) .

'-'

;

$uuid .= substr($chars,12,4) .

'-'

;

$uuid .= substr($chars,16,4) .

'-'

;

$uuid .= substr($chars,20,12);

return

$uuid;

}

 posted on 2011-08-23 23:51  麦田J  阅读(207)  评论(0)    收藏  举报