fix:修复BUG/升级1.1.6版本
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user