【发布时间】:2013-01-13 07:56:44
【问题描述】:
我有一个 php 代码,它使用文件夹中的每个图像并在我的页面上回显 url。
我需要帮助的是让 php 代码在每次加载页面时随机化 url 列表。
我的代码是:
<?php
if ($handle = opendir('images')) {
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$thelist .= '<div data-delay="5"><img src="images/'.$file.'"></div>';
}
}
closedir($handle);
}
?>
<?=$thelist?>
非常感谢
【问题讨论】:
-
那么,有什么问题,你想要什么?
标签: php