<?php echo rand(0, 5); ?>
rand这玩意可以用来生成指定范围内的随机数or字符,于是可以拿来做随机展示图片
<?php $domain = 'http://www.fouland.com/'; echo $domain; echo '<img src="' . $domain . '/Path/currentName' . rand(0, 5) . '.gif"'; ?>
Tags: rand
Tuesday, June 3rd, 2008 at 10:10 pmand is filed under php. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.