随机变化的.jpg图片


实现的原理很简单,就是apache的url_rewrite功能+php程序
url_rewrite代码
[code][test@test htdocs]$ cat .htaccess
# BEGIN WordPress

RewriteEngine On
RewriteRule ^images/logo\.jpg$ /test/randomimg.php [L]
[/code]

php代码
[code lang=”php”] [/code]
只要把把要显示的图片放到
$dir目录里就可以了:)
效果点击这里,或者刷新本页面,看右上角的图片。


《 “随机变化的.jpg图片” 》 有 2 条评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注