看手册一个地方不明白
<?phpsrand((float) microtime() * 10000000);
$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
$rand_keys = array_rand($input, 2);
print $input[$rand_keys[0]] . "\n";
print $input[$rand_keys[1]] . "\n";
?>
其中srand((float) microtime() * 10000000); 是什么意思?? 注意: 自 PHP 4.2.0 起,不再需要用 srand() 或 mt_srand() 函数给随机数发生器播种,现已自动完成。
手册中的话 不明白只因为你没注意看了
页:
[1]
