ProdigYu's Blog

PHP

PHP随机显示图片

by ProdigYu on Aug.26, 2011, under PHP

pic.php list.txt放在网站根目录

pic.php内容如下:
<?php
$arr=file('list.txt');
$n=count($arr)-1;
header('Location: http://prodigyu.com/pic/'.$arr[rand(0,$n)]);
?>
(continue reading…)

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...