... ist wohl entweder ein Server Rechte Problem, oder sonst was kurioses.
Auf jeden Fall ist es mit einem php Skript sehr einfach lösbar.
Wer auch eine alternative Lösung sucht:
- wenn ich jetzt noch wüsste, wo ich dir Vorlage herhabe...
- heißt D-Indexer von "Onkel_Doc" und die HP die im Skript angegeben ist, ist leider nicht mehr verfügbar und auf die Schnelle finde ich die Seite auch nicht mehr; deshalb: cut&paste:
Das ist die von mir leicht abgeänderte Version (Original Quelle leider nicht mehr gefunden...).
Anleitung:
das Teil als index.php in das Direktory speichern und einen simplen "href" link auf diese datei setzen - funktioniert wunderbar:-)
Chris
<?php
///////////////////////////////////
// D-Indexer (c)2001 by OnkelDoc //
// http://www.onkeldoc.f2s.com //
// Onkel_Doc@gmx.net //
// Version 1.1.1 //
// 29.04.2001, 20:10 //
///////////////////////////////////
if(empty($dir))
{
$dir=".";
}
if (substr("$dir",strlen("$dir")-1,1) == "/") $dir = substr("$dir",0,strlen("$dir")-1);
if(substr($dir,0,1) != ".")
{
$dir=".";
}
for ($i=0; $i<=strlen($dir); $i++)
{
if(substr($dir,$i,2) == "..")
{
$dir=".";
}
}
?>
<html>
<head>
<title>Directory Index of <?php if (!$dir || $dir == ".") echo "./"; else echo "$dir"; ?></title>
<style>
body {font-family: Verdana, Arial; font-size: 12px}
a {text-decoration: none}
a:hover {text-decoration: underline}
</style>
</head>
<body link="#0000FF" alink="#0000FF" vlink="#0000FF">
<h1>Materialien<?php if (!$dir || $dir == ".") echo ""; else echo "$dir"; ?></h1>
<p>Mit Rechtsclick und dann "Speichern Unter" bzw. "Ziel speichern unter" <br>
können alle Dateien runtergeladen werden</P>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="center" width="20"><font size="4"><b>▼</b></font></td>
<td align="left" width="*"><b>File</b></td>
<td align="right" width="150"><b>Size</b></td>
<td align="right" width="150"><b>Date</b></td></tr>
</tr>
</table>
<hr>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<?php
if($dir != ".")
{
$dirs = explode("/", $dir);
$len = strlen($dir) - (strlen($dirs[count($dirs) - 1]) + 1);
$updir = substr($dir,0,$len);
echo "<tr><td align="center" width="20"><b>«</b></td>";
echo "<td align="left" width="*"><a href="$PHP_SELF?dir=$updir">UP</a></td>";
echo "<td align="right" width="150">-</td>";
echo "<td align="right" width="150">-</td></tr>\n";
}
$directory=opendir($dir);
while($akt=readdir($directory))
{
if(ereg("^.",$akt)) continue;
if(is_dir("$dir/$akt"))
{
echo "<tr><td align="center" width="20"><b>»</b></td>";
echo "<td align="left" width="*"><a href="$PHP_SELF?dir=$dir/$akt">$akt</a></td>";
echo "<td align="right" width="150">-</td>";
echo "<td align="right" width="150">" . date("d.m.Y",filectime("$dir/$akt")) . "</td></tr>\n";
}
}
closedir($directory);
$directory=opendir($dir);
while($akt=readdir($directory))
{
if(ereg("^.",$akt)) continue;
if(ereg($akt,$PHP_SELF) && $dir == ".") continue;
if(is_file("$dir/$akt"))
{
$size=round(intval(filesize("$dir/$akt"))/1024);
if ($size == "0") { $size="1"; }
echo "<tr><td align="center" width="20"><b>-</b></td>";
echo "<td align="left" width="*"><a href="$dir/$akt">$akt</a></td>";
echo "<td align="right" width="150">" . $size . " kB</td>";
echo "<td align="right" width="150">" . date("d.m.Y",filectime("$dir/$akt")) . "</td></tr>\n";
}
}
closedir($directory);
?>
</table>
<hr>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>Legende:</br><font size="2">« zurück ins obere Verzeichnis </br>» Verzeichnis </br>- Datei</font></td>
</tr>
</table>
</body>
</html>