von Marcus |
Ok, einen Fehler gefunden, der öffnet ja gar kein Verzeichnis, aber: nächtes Problem:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: | <?
$verz = getcwd();
$verz=opendir ($verz);
while ($file = readdir ($verz))
{
if ($file != ".." && $file != ".")
{
echo "<a href=\"$file/\" target=\"_blank\">$file</a>";
echo "<br>";
}
}
closedir($verz);
?> |
Da kommt nämlich
Warning: opendir() [function.opendir]: open_basedir restriction in effect. File(/www/htdocs/pirroorg) is not within the allowed path(s): (/www/htdocs/pirroorg/) in /www/htdocs/pirroorg/index1.php on line 4
Warning: opendir(/www/htdocs/pirroorg) [function.opendir]: failed to open dir: Operation not permitted in /www/htdocs/pirroorg/index1.php on line 4
Warning: readdir(): supplied argument is not a valid Directory resource in /www/htdocs/pirroorg/index1.php on line 5
Warning: closedir(): supplied argument is not a valid Directory resource in /www/htdocs/pirroorg/index1.php on line 13 |
|
von Marcus |
Hab mal noch ein bisserl rumprobiert, nutzt aber auch nix:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15: | <?
$verz = getcwd();
echo "$verz"; // ->gibts richtige Verzeichnis aus!
while ($file = readdir ($verz))
{
if ($file != ".." && $file != ".")
{
echo "<a href=\"$file/\" target=\"_blank\">$file</a>";
echo "
";
}
}
closedir($verz);
?> |
Bekomme dann als Fehlermeldung:
Warning: readdir(): supplied argument is not a valid Directory resource in /www/htdocs/pirroorg/index1.php on line 7
Warning: closedir(): supplied argument is not a valid Directory resource in /www/htdocs/pirroorg/index1.php on line 15 |
Auf Content/ kann ich zugreifen, chmod 755, aber auf . nicht. |
von michaelh |
Zugrisffsrechte richtig gesetzt? (chmod) |
von Marcus |
Ne, das bringt auch net viel. Lass ich das .'/content/' weg bekomme ich ein
Warning: opendir(/www/htdocs/pirroorg/) [function.opendir]: failed to open dir: Permission denied in /www/htdocs/pirroorg/index1.php on line 17 |
Mach ichs mit './content/' bekomme ich gar nichts zurückgeliefert.
|
von Philipp Gérard |
eben, bei inet4you ist der safe_mode (gottlob) nicht aktiv.
probier mal
1: | $verz=opendir($_SERVER["DOCUMENT_ROOT"].'/content/'); |
|