//第一步:初始化种子 
$seedarray =microtime(); 
$seedstr =split(" ",$seedarray,5); 
$seed =$seedstr[0]*10000; //第二步:使用种子初始化随机数发生器 
srand($seed); //第三步:生成指定范围内的随机数 
$random =rand(0,$n);