Php-indhold vises ikke
Kan nogen fortælle mig hvad der er galt med dette script (noget af det er copy/paste og andet har jeg selv lavet):<? php
if ($_REQUEST['dir'] == 'tom')
{
//Vi starter tabellen til layout'et
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
//sætter tabel til 1 for at kunne lave opdeling
$tabel = 1;
//define the path as relative
$path = "/home/web/web126139/alex/galleri";
//using the opendir function
$dir_handle = @opendir($path) or die("Unable to open $path");
//running the while loop
while ($file = readdir($dir_handle))
{
if($file!="." && $file!="..")
{
if($tabel == '1')
{
echo "<tr><td><a href=index.php?s=content&p=galleri&dir=$file > <img src=/galleri/$file/logo.jpg align=\"middle\" border=0 alt=\"\" > $file</a><br/><br/></td>";
$tabel = 2;
}
else
{
echo "<td><a href=index.php?s=content&p=galleri&dir=$file > <img src=/galleri/$file/logo.jpg align=\"middle\" border=0 alt=\"\" > $file</a><br/><br/></td></tr>";
$tabel = 1;
}
}
}
//closing the directory
closedir($dir_handle);
//Slut tabellen af
echo "</table>";
}
else
{
//Vi starter tabellen til layout'et
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
//sætter tabel til 1 for at kunne lave opdeling
$tabel = 1;
$mappe = $_REQUEST['dir']
//define the path as relative
$path = "/home/web/web126139/alex/galleri/" . $mappe;
//using the opendir function
$dir_handle = @opendir($path) or die("Unable to open $path");
//running the while loop
while ($file = readdir($dir_handle))
{
if($file!="." && $file!=".." && $file!="logo.jpg")
{
if($tabel == '1')
{
echo "<tr><td><a href=galleri/$mappe/$file target=_blank> <img src=/galleri/$mappe/$file/small/0001.jpg align=\"middle\" border=0 alt=\"\" > $file</a><br/><br/></td>";
$tabel = 2;
}
else
{
echo "<td><a href=galleri/$mappe/$file target=_blank> <img src=/galleri/$mappe/$file/small/0001.jpg align=\"middle\" border=0 alt=\"\" > $file</a><br/><br/></td></tr>";
$tabel = 1;
}
}
}
//closing the directory
closedir($dir_handle);
//Slut tabellen af
echo "</table>";
}
?>