私は自分のウェブサイト用にPHPギャラリーを作成しています。通常のHTMLページ内のiFrame内に表示されます。
<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>
前もって感謝します。