foreach (new DirectoryIterator('../Backend/templates') as $fileInfo) {
if ($fileInfo->isDot()) continue;
$file=$fileInfo->getRealPath();
$proof=file_get_contents($file);
$isnewfile=str_replace($Wortalt, $Wortneu, $proof);
if ($proof!=$isnewfile) {
file_put_contents($file, $isnewfile);
echo "<p>$file</p>";
}
$newName = str_replace($Wortalt, $Wortneu, $fileInfo->getPathname());
if ($newName!=$fileInfo->getPathname()) {
if ( rename ( $fileoldname=$fileInfo->getPathname(), $newName ) ) {
echo "<p>$fileoldname wurde in $newName wurde umbenannt</p>";
}
else {
echo "<p>Fehler: Datei $fileoldname konnte nicht umbenannt werden</p>";
}
}
}
foreach (new DirectoryIterator('../Backend/includes') as $fileInfo) {
if ($fileInfo->isDot()) continue;
$file=$fileInfo->getRealPath();
$proof=file_get_contents($file);
$isnewfile=str_replace($Wortalt, $Wortneu, $proof);
if ($proof!=$isnewfile) {
file_put_contents($file, $isnewfile);
echo "<p>$file</p>";
}
$newName = str_replace($Wortalt, $Wortneu, $fileInfo->getPathname());
if ($newName!=$fileInfo->getPathname()) {
if ( rename ( $fileoldname=$fileInfo->getPathname(), $newName ) ) {
echo "<p>$fileoldname wurde in $newName wurde umbenannt</p>";
}
else {
echo "<p>Fehler: Datei $fileoldname konnte nicht umbenannt werden</p>";
}
}
}
foreach (new DirectoryIterator('../Backend') as $fileInfo) {
if ($fileInfo->isDot()) continue;
$file=$fileInfo->getRealPath();
$proof=file_get_contents($file);
$isnewfile=str_replace($Wortalt, $Wortneu, $proof);
if ($proof!=$isnewfile) {
file_put_contents($file, $isnewfile);
echo "<p>$file</p>";
}
$newName = str_replace($Wortalt, $Wortneu, $fileInfo->getPathname());
if ($newName!=$fileInfo->getPathname()) {
if ( rename ( $fileoldname=$fileInfo->getPathname(), $newName ) ) {
echo "<p>$fileoldname wurde in $newName wurde umbenannt</p>";
}
else {
echo "<p>Fehler: Datei $fileoldname konnte nicht umbenannt werden</p>";
}
}
}
foreach (new DirectoryIterator('../Backend/css') as $fileInfo) {
if ($fileInfo->isDot()) continue;
$file=$fileInfo->getRealPath();
$proof=file_get_contents($file);
$isnewfile=str_replace($Wortalt, $Wortneu, $proof);
if ($proof!=$isnewfile) {
file_put_contents($file, $isnewfile);
echo "<p>$file</p>";
}
$newName = str_replace($Wortalt, $Wortneu, $fileInfo->getPathname());
if ($newName!=$fileInfo->getPathname()) {
if ( rename ( $fileoldname=$fileInfo->getPathname(), $newName ) ) {
echo "<p>$fileoldname wurde in $newName wurde umbenannt</p>";
}
else {
echo "<p>Fehler: Datei $fileoldname konnte nicht umbenannt werden</p>";
}
}
}
foreach (new DirectoryIterator('../Backend/pages') as $fileInfo) {
if($fileInfo->isDot()) continue;
//echo $fileInfo->getFilename() . "<br>\n";
$file=$fileInfo->getRealPath();
//echo "<p>$file</p>";
$proof=file_get_contents($file);
//die;
$isnewfile=str_replace($Wortalt, $Wortneu, $proof);
if ($proof!=$isnewfile) {
file_put_contents($file, $isnewfile);
echo "<p>$file</p>";
//echo $fileInfo->getFilename() . "<br>\n";
}
$newName = str_replace($Wortalt, $Wortneu, $fileInfo->getPathname());
if ($newName!=$fileInfo->getPathname()) {
if ( rename ( $fileoldname=$fileInfo->getPathname(), $newName ) ) {
echo "<p>$fileoldname wurde in $newName wurde umbenannt</p>";
}
else {
echo "<p>Fehler: Datei $fileoldname konnte nicht umbenannt werden</p>";
}
}
}