????????з????
???????????? ???????[ 2016/4/1 11:05:11 ] ????????????? ?????
???????????????У???????????????????????????????????????????????????????????з?????????????????????????????????????????????г??????????з???????????Щ????????????????????????????·?????????????????????????????????з?????????????SNS???У??????UID???????????????????????η?????ò?????
??????????????MD5???
???????????UID????md5????????????λ??????????????λ????????????????UID????????????????user_xx???????
????function getTable( $uid ){
????$ext = substr ( md5($uid) ??0 ??2 );
????return "user_".$ext;
????}
????????????????????????????UID?????256????????У??????user_00??user_01 …… user_ff?????UID?????????????????md5??????????????????????????????????user???С?
?????????????и????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????λ
???????巽?????
????public function getTable( $uid ) {
????return "user_" . sprintf( "%04d"?? ($uid >> 20) );}
?????????????uid???????20λ?????????????????100???????????????????user_0000???????100???????????????????user_0001?У????????????????????????????????????????????????????????????????λ????????????????1????????????user_0000??user_0001 …… user_9999?????????????100???????????????100?????????????????????????????????????????????????????????????????????????????????1000???????????????100??????????10????????????????????6λ???ɡ?
?????????????????д??????
????/**
????* ????UID?????
????*
????* @param int $uid //???ID
????* @param int $bit //?????????λ
????* @param int $seed //???????λ??
????*/
????function getTable( $uid ?? $bit ?? $seed ){
????return "user_" . sprintf( "%0{$bit}d" ?? ($uid >> $seed) );}
???????
??????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????100???????????????????100??????????????UID???20????????????100??????????????????user_xxxx????λ?????1??????
?????????????????????100??md5??????λ???????256??????????????????256*100????????????????????????????????????MD5????λ??????λ????????λ???
???????????????????????з?????????У???????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11