fix:修复BUG/升级1.1.6版本

This commit is contained in:
Ying
2023-04-25 20:11:49 +08:00
parent 445e5f9662
commit 6a6866bbaf
2357 changed files with 456920 additions and 140567 deletions

View File

@@ -35,23 +35,23 @@ class Install
}
/**
* installByRelation
* InstallByRelation
* @return void
*/
public static function installByRelation()
{
foreach (static::$pathRelation as $source => $dest) {
if ($pos = strrpos($dest, '/')) {
$parent_dir = base_path() . '/' . substr($dest, 0, $pos);
if (!is_dir($parent_dir)) {
mkdir($parent_dir, 0777, true);
$parentDir = base_path() . '/' . substr($dest, 0, $pos);
if (!is_dir($parentDir)) {
mkdir($parentDir, 0777, true);
}
}
$source_file = __DIR__ . "/$source";
copy_dir($source_file, base_path() . "/$dest", true);
$sourceFile = __DIR__ . "/$source";
copy_dir($sourceFile, base_path() . "/$dest", true);
echo "Create $dest\r\n";
if (is_file($source_file)) {
@unlink($source_file);
if (is_file($sourceFile)) {
@unlink($sourceFile);
}
}
}