如何根据PHP中的当前日期时间和用户名生成随机激活码。
返回值应该是这样的,即:
201605021955Username
function getActivationCode($username){
$activationCode = "";
....
return activationCode;
}
答案 0 :(得分:1)
function getActivationCode($username){
$activationCode =date('YmdHi').$username;
return activationCode;
}
答案 1 :(得分:0)
你要求的不是随机的,而是:
#loading-gif{
width:100%;
}
#overlay-inAbox .wrapper {
text-align: center;
}
#overlay-shade {
display: none;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 10;
background-color: #000;
}
.overlay {
border: 3px solid #000;
border-radius: 25px;
background-color: #fff;
position: fixed;
left: 0;
width: 50%;
z-index: 11;
color: #000;
}
.ie7 .overlay {
height: 200px;
}
.overlay .wrapper {
padding: 15px 30px 30px;
text-align: center;
}
#overlay-inAbox8 {
position: fixed;
top: 50%;
left: 50%;
width: 190px;
height: 90px;
line-height: 90px;
text-align: center;
margin-top: -50px;
margin-left: -100px;
display: none;
}