php实现随机背景图片

<?php $random_image = rand(1, 5); /*选择图片*/ ?>
<img id="background" alt="" src="/images/<?php echo $random_image; ?>.jpg" />

关键词: php