瀏覽代碼

List priority banners in banners.php.

pull/58/head
Michael Walker 7 年之前
父節點
當前提交
5cf54dbce0
共有 1 個檔案被更改,包括 10 行新增5 行删除
  1. +10
    -5
      banners.php

+ 10
- 5
banners.php 查看文件

@@ -4,14 +4,19 @@
</head> </head>
<body> <body>
<?php <?php
if ($handle = opendir('banners')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "<a href=\"banners/$entry\"><img src=\"banners/$entry\" alt=\"$entry\" style=\"width:348px;height:128px\"></a> ";
function listBannersInDir($dir) {
if ($handle = opendir($dir)) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "<a href=\"$dir/$entry\"><img src=\"$dir/$entry\" alt=\"$entry\" style=\"width:348px;height:128px\"></a> ";
}
} }
closedir($handle);
} }
closedir($handle);
} }

listBannersInDir("banners_priority");
listBannersInDir("banners");
?> ?>
</body> </body>
</html> </html>

Loading…
取消
儲存