Welcome to bytea
当前位置: Home 学习资料 网站制作 php生成随机数-rand() 今天是...date...

登录bbs

用户名
密码

bytea统计

Members : 43193
Content : 333
Web Links : 69
php生成随机数-rand() PDF Print E-mail
Sunday, 20 March 2005 08:07

rand

取得随机数值。

语法: int rand([int min], [int max]);

返回值: 整数

函数种类: 数学运算

内容说明:

本函数用来取得随机数值。若没有指定随机数的最大及最小范围,本函数会自动的从 0 到 RAND_MAX 中取一个随机数。若有指定 min 及 max 的参数,则从指定参数中取一个数字。例如 rand(38, 49) 则会从 38 到 49 之间取一个随机数值,UNIX 系统包含 49、Win32 系统不包含 49 ( This e-mail address is being protected from spambots, you need JavaScript enabled to view it 10-May-1999)。值得注意的是为使随机数的乱度最大,每次在取随机数之前最好使用 srand() 以配置新的随机数种子。

应用:在本站的许愿板(漂流瓶和许愿云)中,使用此函数使各个愿望的前进速度不同。

Comments (0)Add Comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security code
Write the displayed characters


busy
 

支持本站:



Connect with me via QQ:38074 or e-mail:

©2006 bytea.net All Copyrights Reserved.

本站备案编号:保密^_^

RSS:  

开启背景音乐