hallo und zwar will ich in meiner Gallerie in der großansicht (bild.php) den aktuellen Bildnamen ausgeben das geht eigentlich auch jedoch zeigt er an "images//bild.jpg" weil die bilder in dem verzeichnisss images sind wie mach ich es das es ohne dieses "images" ist hier mal der code.
index.php
bild.php
index.php
PHP:
<html>
<title>Gallerie</title>
<body bgcolor="#c0c0c0" oncontextmenu="return false">
<?php
echo "<div align =\"center\">";
include "titel.php";
echo "<h1><font style = \"color:#e2007a;\">$titel</font></h1>";
$dir='images/';
$thumb='thumb/';
$open=dir($dir);
$img=array();
while(false!==($entry= $open->read()))if(strlen($entry)>2)$x4[]=$entry;
$open->close();
sort($img);
echo '<table border="1" bgcolor="#c0c0c0">'."\r\n";
for($i1=0;$i1<count($x4);$i1+=3){
echo '<tr>'."\r\n";
for($i3=0;$i3<3;$i3++){
echo '<td>';
if($x4[$i1+$i2+$i3]){
echo "<a target=\"_parent\" href=\"bild.php?link=".$dir."/".$x4[$i1+$i2+$i3]. "\"><div align=\"center\"><img border=0 src=\"".$thumb."/".$x4[$i1+$i2+$i3]."\"></div></a>";
echo "<div align=\"center\">";
echo "<font style = \"color:#60605f;\">";
echo $x4[$i1+$i2+$i3];
echo "</font>";
echo "</div>";
} else {
echo ' ';
;
}
echo '</td>'."\r\n";
}
echo '</tr>'."\r\n";
}
echo '</table>'."\r\n";
echo "</div>";
?>
</body>
</html>
bild.php
PHP:
<html>
<title>Gallerie</title>
<body bgcolor="#000000" oncontextmenu="return false">
<?php
echo "<div align =\"center\">";
echo "<img border=4 alt =\"\"src=\"".$_GET["link"]."\">";
echo "<br>";
echo $_GET["link"];
echo "<br>";
echo "<a href=\"javascript:history.back()\"><font style = \"color:#e2007a;\">Zurück zur übersicht </font></a>";
echo "</div>";
?>
</body>
</html>