Hi
ich hab ein Script geschrieben welches einen Ordner mit 3 unterordnern erstellt. Jedoch macht er beim ersten Ordner nicht CHMOD auf 777 sondern auf 755. Folgende Fehler kommen (vielleicht auch anderer Grund, auf jeden Fall erstellt er die Unterordner nicht)
Code:
Warning: OpenDir: No such file or directory (errno 2) in /var/www/web4/html/baracs.php on line 60
Warning: Supplied argument is not a valid Directory resource in /var/www/web4/html/baracs.php on line 63
Warning: Supplied argument is not a valid Directory resource in /var/www/web4/html/baracs.php on line 91
Warning: SAFE MODE Restriction in effect. The script whose uid is 652 is not allowed to access img/calella/Test2 owned by uid 33 in /var/www/web4/html/make_dir.php on line 30
Warning: SAFE MODE Restriction in effect. The script whose uid is 652 is not allowed to access img/calella/Test2 owned by uid 33 in /var/www/web4/html/make_dir.php on line 31
Warning: SAFE MODE Restriction in effect. The script whose uid is 652 is not allowed to access img/calella/Test2 owned by uid 33 in /var/www/web4/html/make_dir.php on line 32
komischerweise geht das Script auf einem anderen Server.
hier die make_dir.php
PHP-Code:
<?php
$dateiname = "index.php?site=c_bilder";
$dir_main = "img/calella";
$password = "kuba";
if ($step == "" or $step == "in")
{
printf("
<form method='post' action='$dateiname&step=out'>
Ordner <input size='10' type='text' name='ordnername' style='color: #000000; background-color: #FFFFFF; font-size: 10px; font-family: verdana; border-top: #194A7A 1px solid; border-right: #194A7A 1px solid; border-left: #194A7A 1px solid; border-bottom: #194A7A 1px solid'>
Pw <input size='5' type='text' name='pass' style='color: #000000; background-color: #FFFFFF; font-size: 10px; font-family: verdana; border-top: #194A7A 1px solid; border-right: #194A7A 1px solid; border-left: #194A7A 1px solid; border-bottom: #194A7A 1px solid'>
<input type='submit' name='anlegen' value='Ordner anlegen' style='color: #000000; background-color: #FFFFFF; font-size: 10px; font-family: verdana; border-top: #194A7A 1px solid; border-right: #194A7A 1px solid; border-left: #194A7A 1px solid; border-bottom: #194A7A 1px solid'>
</form>
");
}
elseif ($step == out && $password == $_POST['pass'])
{
$dir_name = $_POST['ordnername'];
$dedir = "$dir_main/$dir_name";
if (is_dir($dedir))
{
echo "<p align='center'>Dieser Ordner ist schon vorhanden.</p>
<p align='center'>[url='javascript:history.back()']Bitte klicken Sie hier für eine erneute Eingabe![/url]</p>";
}
else
{
mkdir ("$dedir", 0777);
mkdir ("$dedir/original", 0777);
mkdir ("$dedir/preview", 0777);
mkdir ("$dedir/thumbs", 0777);
echo "<p align='center'>Ordner [b]$dir_name[/b] (Unterordner [i]original, preview und thumbs[/i]) erfolgreich in Verzeichnis $dir_main erstellt</p>";
}
}
else
{
echo "<p align='center'>Sorry, falscher Link und/oder falsches Passwort.</p>
<p align='center'>[url='$dateiname&step=in']Bitte klicken Sie hier für eine erneute Eingabe![/url]</p>";
}
?>
thx 4 help
mfg psy