日期:2014-05-17 浏览次数:20647 次
function dwz($id,$str=""){
$a=array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
$zs=(int)($id/sizeof($a));
$xs=$id%sizeof($a);
if($zs>=sizeof($a)){
$str=$a[$xs].$str;
dwz($zs,$str);
}
else{
if($str==""){
return $a[$zs].$a[$xs];
}
else{
echo $a[$zs].$str;//这里只能输出
return $a[$zs].$str;//返回没值,不知道什么原因
}
}
}
for($i=999990;$i<=1000000;$i++){
echo dwz($i);
echo "<br>";
}
if($zs>=sizeof($a)){
$str=$a[$xs].$str;
dwz($zs,$str); //这里加入return: return dwz($zs, $str);
}