我正在爲我的網站創建PHP畫廊。它將在正常HTML頁面內的iFrame內顯示。PHP畫廊不工作
<html>
<head><title></title></head>
<body>
<table><tr>
<?php
define('Photo_dir','img');
define('Columns',2);
$x=0;
$y=0;
$results = scandir(Photo_dir);
foreach ($results as $result)
{
if ($result === '.' or $result === '..') continue;
if (is_dir(Photo_dir.'/'.$result))
{
if($y > 2)
{
echo "</tr><tr>";
$y=0;
$x=&x+1;
}
echo "<td><img src='image.php?photo=".Photo_dir."/".$result."/1.jpg'/></td>";
echo "kod w html";
}
}
?>
</tr>
</table>
</body>
</html>
由於某種原因,它無法正常工作。瀏覽器甚至沒有看到<table>
在此先感謝。
您是否有現場示例來演示此問題?在開啓身體有效性之前,你還應該有'
@PhilipWhitehouse加'