我正在尝试使用此 html 在我的页面中创建一些画廊:
<tr>
<th> Sunday</th>
<th> Monday</th>
<th> Tuesday</th>
<th> Wednesday</th>
<th> Thursday</th>
<th> Friday</th>
<th> Saturday</th>
</tr>
<tr>
<td><img src="pics_index.php?size=110&index=0"></td>
<td><img src="pics_index.php?size=110&index=1"></td>
<td><img src="pics_index.php?size=110&index=2"></td>
<td><img src="pics_index.php?size=110&index=3"></td>
<td><img src="pics_index.php?size=110&index=4"></td>
<td><img src="pics_index.php?size=110&index=5"></td>
<td><img src="pics_index.php?size=110&index=6"></td>
</tr>
</table>
我将 glob 7 个图像,然后创建一个包含图像名称的数组:
<?php
include('pics_reduce_lib.php');
$images = array("pics_daily/degas.jpg","pics_daily/manet.jpg","pics_daily/monet.jpg","pics_daily/renoir.jpg","pics_daily/rousseau$
for ($index=0;$index=<7;++$i)
}
$pics = glob("pics_daily/*.{gif,jpg,png}",GLOB_BRACE);
$filename = $pics[$images];
$newWidth = $_GET["size"];
$contents = resizeToVariable($filename);
header("Content-type: $type");
print $contents;
?>
resizeToVariable 是我的图像调整大小程序。
谁能指出我做错了什么?它无法显示。谢谢你。