如何加ID生成? [ 新手入门 ]
请教高手,现在我有这样的需求。内容表中ID不是自增的整型,而是字符型。生成GUID,我现在有一个GUID类,请教高手我该如何做?
多谢:P
共 4 条回复
-
-
照样做了,还是显示:
PHP Error Non-static method NetAddress::getHost() should not be called statically, assuming $this from incompatible context \protected\components\Guid.php(10)
function getGuid($coumputer_name, $ip){ 10 $address = NetAddress::getHost($coumputer_name, $ip); 11 $this->valueBeforeMD5=$address->toString().':'.System::currentTimeMillis().':'.Random::nextLong(); 12 $this->valueAfterMD5 = md5($this->valueBeforeMD5); }
-
-
yii
注册时间:2011-02-25
最后登录:2023-09-08
在线时长:2小时12分
最后登录:2023-09-08
在线时长:2小时12分
- 粉丝2
- 金钱200
- 威望0
- 积分220