Hallo Leute,
hier ein Skript, dass Dateien von einem Ordner in einen anderen kopieren soll:
private function Get_HTML()
{
$WebfrontPath = IPS_GetKernelDir()."webfront".DIRECTORY_SEPARATOR."user".DIRECTORY_SEPARATOR."Enigma_HTML";
$SourcePath = IPS_GetKernelDir()."modules".DIRECTORY_SEPARATOR."SymconModules".DIRECTORY_SEPARATOR."IPS2Enigma".DIRECTORY_SEPARATOR."HTML";
if (file_exists($WebfrontPath)) {
// Das Verzeichnis existiert bereits
}
else {
//Das Verzeichnis existiert nicht
$result = mkdir($WebfrontPath);
If (!$result) {
IPS_LogMessage("IPS2Enigma","Fehler bei der Verzeichniserstellung!");
}
}
$Path = opendir ($SourcePath);
while ($file = readdir ($Path)) // Verzeichnis öffnen und auslesen
{
copy($SourcePath.DIRECTORY_SEPARATOR.$file, $WebfrontPath.DIRECTORY_SEPARATOR.$file); // Datei kopieren
}
closedir($Path);
}
und obwohl offenbar alles kopiert wird bekomme ich die folgende Fehlermeldung:
(In Zeile die bemängelt wird steht der Copy-Befehl)
Woran liegt das?
Joachim