Tady mas primitivni, ALE FUNKCNI galerku, kde je jediny soubor index.php ve slozce spolecne se vsemi obrazky.(ke stezni zde pc.poradna.net/file/view/10047-poradna-zip kod nize:)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<title></title>
</head>
<body>
<?php
$adresar=opendir('.');
while($objekt=readdir($adresar))
{
if($objekt=="."||$objekt==".."||$objekt=="index.php")continue;
$soubor[]=$objekt;
}
if(!isset($_GET["strana"]))
{$_GET["strana"]=0;}
echo "<img src=\"".$soubor[$_GET["strana"]]."\" border=\"0\"><br>";
if(($_GET["strana"])!=0)
{echo "<a href=\"index.php?strana=".($_GET["strana"]-1)."\">zpet</a><br>";}
if(count($soubor)>($_GET["strana"]+1))
{echo "<a href=\"index.php?strana=".($_GET["strana"]+1)."\">dalsi</a><br>";}
?>
</body>
</html>