mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-02-24 15:36:33 +08:00
Remove Echo Debug
This commit is contained in:
parent
1f4bd28045
commit
e0eed484e9
1 changed files with 1 additions and 8 deletions
|
@ -5,21 +5,17 @@ class File
|
||||||
|
|
||||||
public static function copyFolder($from, $to, $exclude = [])
|
public static function copyFolder($from, $to, $exclude = [])
|
||||||
{
|
{
|
||||||
echo "copyFolder($from, $to);<br>";
|
|
||||||
$files = scandir($from);
|
$files = scandir($from);
|
||||||
print_r($files);
|
print_r($files);
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (is_file($from . $file) && !in_array($file, $exclude)) {
|
if (is_file($from . $file) && !in_array($file, $exclude)) {
|
||||||
if (file_exists($to . $file)) unlink($to . $file);
|
if (file_exists($to . $file)) unlink($to . $file);
|
||||||
rename($from . $file, $to . $file);
|
rename($from . $file, $to . $file);
|
||||||
echo "rename($from$file, $to$file);<br>";
|
|
||||||
} else if (is_dir($from . $file) && !in_array($file, ['.', '..'])) {
|
} else if (is_dir($from . $file) && !in_array($file, ['.', '..'])) {
|
||||||
if (!file_exists($to . $file)) {
|
if (!file_exists($to . $file)) {
|
||||||
echo "mkdir($to$file);;<br>";
|
|
||||||
mkdir($to . $file);
|
mkdir($to . $file);
|
||||||
}
|
}
|
||||||
echo "File::copyFolder($from$file, $to$file);<br>";
|
File::copyFolder($from . $file . DIRECTORY_SEPARATOR, $to . $file . DIRECTORY_SEPARATOR, $exclude);
|
||||||
File::copyFolder($from . $file . DIRECTORY_SEPARATOR, $to . $file . DIRECTORY_SEPARATOR);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,15 +25,12 @@ class File
|
||||||
$files = scandir($path);
|
$files = scandir($path);
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (is_file($path . $file)) {
|
if (is_file($path . $file)) {
|
||||||
echo "unlink($path$file);<br>";
|
|
||||||
unlink($path . $file);
|
unlink($path . $file);
|
||||||
} else if (is_dir($path . $file) && !in_array($file, ['.', '..'])) {
|
} else if (is_dir($path . $file) && !in_array($file, ['.', '..'])) {
|
||||||
File::deleteFolder($path . $file . DIRECTORY_SEPARATOR);
|
File::deleteFolder($path . $file . DIRECTORY_SEPARATOR);
|
||||||
echo "rmdir($path$file);<br>";
|
|
||||||
rmdir($path . $file);
|
rmdir($path . $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "rmdir($path);<br>";
|
|
||||||
rmdir($path);
|
rmdir($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue