/** * 复制文件夹 * @param string $oldDir 原文件夹 * @param string $targetDir 复制后的文件夹名 * @param boolean $overWrite 是否覆盖原文件夹(true:覆盖原文件夹,false:不覆盖原文件夹)默认覆盖 * @return boolean 复制成功返回true,否则返回false */ function copydir($oldDir, $targetDir, $overWrite = true) { $oldDir = path_absolute($oldDir); $targetDir = path_absolute($targetDir); @clearstatcache(); $targetDir = substr($targetDir, -1) == '/' ? $targetDir : $targetDir . '/'; $oldDir = substr($oldDir, -1) == '/' ? $oldDir : $oldDir . '/'; if (!is_dir($oldDir)) { return false; } if (!file_exists($targetDir)) { makedir($targetDir); } $resource = opendir($oldDir); while (($file = readdir($resource)) !== false) { if ($file == '.' || $file == '..') { continue; } if (!is_dir($oldDir . $file)) { copyfile($oldDir . $file, $targetDir . $file, $overWrite); } else { copydir($oldDir . $file, $targetDir . $file, $overWrite); } } @clearstatcache(); if (is_dir($targetDir)) { return true; } else { return false; } }
function copyDir($strSrcDir, $strDstDir) { $dir = opendir($strSrcDir); if (!$dir) { return false; } if (!is_dir($strDstDir)) { if (!mkdir($strDstDir)) { return false; } } while (false !== ($file = readdir($dir))) { if ($file != '.' && $file != '..') { if (is_dir($strSrcDir . '/' . $file)) { if (!copydir($strSrcDir . '/' . $file, $strDstDir . '/' . $file)) { return false; } } else { if (!copy($strSrcDir . '/' . $file, $strDstDir . '/' . $file)) { return false; } } } } closedir($dir); return true; }
function copydir($source, $destination, $temp) { mkdir("{$destination}/{$temp}"); if ($dir = opendir($source)) { while (($file = readdir($dir)) !== false) { //echo "<script>alert('$file');</script>"; if (is_dir("{$source}/{$file}")) { if ($file != '.' && $file != '..') { copydir("{$source}/{$file}", "{$destination}/{$temp}", "{$file}"); } } else { copy("{$source}/{$file}", "{$destination}/{$temp}/{$file}"); } } closedir($dir); } }
function copydir($srcdir, $dstdir){ mkdir($dstdir); $ds = opendir($srcdir); while($file = readdir($ds)){ if($file!= '.' && $file!='..'){ $path = $srcdir.'/'.$file; $dstpath = $dstdir.'/'.$file; if(is_dir($path)){ copydir($path, $dstpath); }else{ copy($path, $dstpath); } } } }
function copydir($srcdir, $dstdir){ if(!file_exists($dstdir)){ mkdir($dstdir); } $ds = opendir($srcdir); while($file = readdir($ds)){ $path = $srcdir.'/'.$file; $dstpath = $dstdir.'/'.$file; if($file != '.' && $file != '..'){ if(is_dir($path)){ copydir($path, $dstpath); }else{ copy($path, $dstpath); } } } closedir($ds); //关闭目录资源 }
/** * Copy a directory from one location to another, * and include all subdirs and files. */ function copydir($source, $destination) { if (is_dir($source)) { @mkdir($destination); $directory = dir($source); while (FALSE !== ($readdirectory = $directory->read())) { if ($readdirectory == '.' || $readdirectory == '..') { continue; } $PathDir = $source . '/' . $readdirectory; if (is_dir($PathDir)) { copydir($PathDir, $destination . '/' . $readdirectory); continue; } copy($PathDir, $destination . '/' . $readdirectory); } $directory->close(); } else { copy($source, $destination); } }
function copydir($source, $destination) { if (!is_dir($destination)) { $oldumask = umask(0); mkdir($destination, 01777); // so you get the sticky bit set umask($oldumask); } $dir_handle = @opendir($source) or die("Unable to open"); while ($file = readdir($dir_handle)) { if ($file != "." && $file != ".." && !is_dir("{$source}/{$file}")) { //if it is file copy("{$source}/{$file}", "{$destination}/{$file}"); } if ($file != "." && $file != ".." && is_dir("{$source}/{$file}")) { //if it is folder copydir("{$source}/{$file}", "{$destination}/{$file}"); } } closedir($dir_handle); }
function makeprodir() { $app_path = $this->getapppath(); //获取生成程序的根目录 $tpl_path = $this->gettplpath(); //获取程序模板的根目录 deldir($app_path); ////common.php文件 tpmk_dir($app_path . '/Lib/Model/'); tpmk_dir($app_path . '/Lib/Action/'); tpmk_dir($app_path . '/Cache/'); //生成Cache目录 tpmk_dir($app_path . '/Common/'); //生成Common目录 tpmk_dir($app_path . '/Conf/'); //生成Conf目录 tpmk_dir($app_path . '/Data/'); //生成Data目录 tpmk_dir($app_path . '/Lang/'); //生成Lang目录 tpmk_dir($app_path . '/Logs/'); //生成Logs目录 tpmk_dir($app_path . '/Temp/'); //生成Temp目录 tpmk_dir($app_path . '/Lib/Com/'); //生成Com目录 tpmk_dir($app_path . '/Tpl/default/Public/'); //生成Tpl目录 copyfile($tpl_path . '/common.php', $app_path . '/Common/common.php'); ////common.php文件 copyfile($tpl_path . '/Action_tpl/PublicAction.class.php', $app_path . '/Lib/Action/PublicAction.class.php'); copyfile($tpl_path . '/Action_tpl/PublicAction.class.php', $app_path . '/Lib/Action/PublicAction.class.php'); ////PublicAction.class.php文件 copydir($tpl_path . '/Static_tpl', $app_path . '/Tpl/default'); ////common.php文件 copydir($tpl_path . '/Com_tpl', $app_path . '/Lib/Com'); ////common.php文件 $this->installtags(); //安装标签 }
function copydir($source, $destination) { if (preg_match("/.svn/i", $source)) { //不能拷贝SVN的文件 return false; } $result = true; if (!is_dir($source)) { //读取源目录 trigger_error("源目录名称错误", E_USER_ERROR); } if (!is_dir($destination)) { //读取目标目录 if (!mkdir($destination, 0700)) { trigger_error("无法创建目标目录", E_USER_ERROR); } } $handle = opendir($source); //取得目录的句柄 while (($file = readdir($handle)) !== false) { if ($file != '.' && $file != '..') { $src = $source . "/" . $file; //源文件路径 $dtn = $destination . "/" . $file; //目标文件路径 if (is_dir($src)) { copydir($src, $dtn); } else { if (!copy($src, $dtn)) { $result = false; break; } } } } closedir($handle); return $result; }
/** +---------------------------------------------------------- * 安装自己的标签在thinkphp的目录里面 +---------------------------------------------------------- * Myhtml这个为thinkmaker专用的 * Mkrtags这个为生成后的代码库专用的 +---------------------------------------------------------- */ function installtags() { copyfile(APP_PATH . '/tpmaker_tpl/tphtmltags/TagLib/TagLibMkrtags.class.php', THINK_PATH . '/Lib/Think/Template/TagLib/TagLibMkrtags.class.php'); //安装标签 copyfile(APP_PATH . '/tpmaker_tpl/tphtmltags/TagLib/TagLibMyhtml.class.php', THINK_PATH . '/Lib/Think/Template/TagLib/TagLibMyhtml.class.php'); //安装标签 copyfile(APP_PATH . '/tpmaker_tpl/tphtmltags/Tags/mkrtags.xml', THINK_PATH . '/Lib/Think/Template/Tags/mkrtags.xml'); //安装标签 copyfile(APP_PATH . '/tpmaker_tpl/tphtmltags/Tags/myhtml.xml', THINK_PATH . '/Lib/Think/Template/Tags/myhtml.xml'); //安装标签 copydir(APP_PATH . '/tpmaker_tpl/tphtmltags/Public', THINK_PATH . '/../Public'); //安装标签相关js }
runquery($sql); $sql = "INSERT INTO wiki_setting (`variable`, `value`) VALUES ('hotsearch', '" . serialize(array(0 => array('name' => 'HDwiki', 'url' => 'index.php?doc-view-51'), 1 => array('name' => '协作者', 'url' => 'index.php?doc-view-34'), 2 => array('name' => 'Wiki与BBS', 'url' => 'index.php?doc-view-22'), 3 => array('name' => 'Wiki', 'url' => 'index.php?doc-view-21'), 4 => array('name' => 'Wiki与Blog', 'url' => 'index.php?doc-view-23'))) . "'),('cooperatedoc', '东北虎;蝙蝠;大耳蝠;维基尼亚鹿;裸鼹鼠;草原犬鼠;指狐猴;树獭;王企鹅'),('hottag', '" . serialize(array(0 => array('tagname' => '考拉', 'tagcolor' => ''), 1 => array('tagname' => '鲸', 'tagcolor' => ''), 2 => array('tagname' => 'HDwiki', 'tagcolor' => ''), 3 => array('tagname' => '鼬', 'tagcolor' => ''), 4 => array('tagname' => '小熊猫', 'tagcolor' => ''), 5 => array('tagname' => '大耳狐', 'tagcolor' => 'red'), 6 => array('tagname' => '紫玉兰', 'tagcolor' => 'red'), 7 => array('tagname' => '驯鹿', 'tagcolor' => 'red'), 8 => array('tagname' => '侏绿鱼狗', 'tagcolor' => 'red'), 9 => array('tagname' => '七彩文鸟', 'tagcolor' => ''), 10 => array('tagname' => '钩嘴翠鸟', 'tagcolor' => 'red'), 11 => array('tagname' => '丹顶鹤', 'tagcolor' => ''), 12 => array('tagname' => '云雀', 'tagcolor' => 'red'), 13 => array('tagname' => '仙居鸡', 'tagcolor' => 'red'), 14 => array('tagname' => '伊力格氏金刚鹦鹉', 'tagcolor' => 'red'), 15 => array('tagname' => '棕腰歌百灵', 'tagcolor' => ''), 16 => array('tagname' => '索科罗苇鹪鹩', 'tagcolor' => ''), 17 => array('tagname' => '八音鸟', 'tagcolor' => ''))) . "'),('advmode', '1');\n"; $sql .= "REPLACE INTO wiki_category (`cid`, `pid`, `name`, `displayorder`, `docs`, `image`, `navigation`, `description`) VALUES\r\n(1, 3, 'HDWIKI', 0, 18, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '1', 'name' => 'HDWIKI'))) . "', ''),\r\n(2, 3, '互动百科', 2, 1, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '2', 'name' => '互动百科'))) . "', ''),\r\n(3, 0, '帮助文档', 2, 0, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'))) . "', ''),\r\n(4, 3, 'wik相关', 1, 3, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '4', 'name' => 'wik相关'))) . "', ''),\r\n(5, 3, '帐号相关', 3, 4, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '5', 'name' => '帐号相关'))) . "', ''),\r\n(6, 3, '词条相关', 4, 0, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '6', 'name' => '词条相关'))) . "', ''),\r\n(7, 3, '分类相关', 5, 0, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '7', 'name' => '分类相关'))) . "', ''),\r\n(8, 3, '投诉建议', 6, 0, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '8', 'name' => '投诉建议'))) . "', ''),\r\n(9, 3, '用户相关', 7, 0, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '9', 'name' => '用户相关'))) . "', ''),\r\n(10, 6, '词条产品相关', 0, 8, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '6', 'name' => '词条相关'), 2 => array('cid' => '10', 'name' => '词条产品相关'))) . "', ''),\r\n(11, 6, '词条命名规范', 1, 2, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '6', 'name' => '词条相关'), 2 => array('cid' => '11', 'name' => '词条命名规范'))) . "', ''),\r\n(12, 6, '词条内容编写规范', 2, 12, '', '" . serialize(array(0 => array('cid' => 3, 'name' => '帮助文档'), 1 => array('cid' => '6', 'name' => '词条相关'), 2 => array('cid' => '12', 'name' => '词条内容编写规范'))) . "', '');"; runquery($sql); //get domain $server_name = $_SERVER['SERVER_NAME']; $domain = $server_name; if ($domain) { $key = @util::hfopen('http://kaiyuan.hudong.com/count2/count.php?m=count&a=getkey&domain=' . $domain, 0); if ($key) { $sql = "INSERT INTO wiki_setting (`variable`, `value`) VALUES ('wk_count', '" . serialize(array('domain' => $domain, 'key' => $key)) . "');"; runquery($sql); } } copydir(HDWIKI_ROOT . '/install/testdata/201007', HDWIKI_ROOT . '/uploads/201007'); copydir(HDWIKI_ROOT . '/install/testdata/201008', HDWIKI_ROOT . '/uploads/201008'); } @touch(HDWIKI_ROOT . '/data/install.lock'); $info['type'] = 1; $info['sitedomain'] = $_SERVER['SERVER_NAME']; $info['siteaddress'] = $site_url; $info['version'] = HDWIKI_VERSION . HDWIKI_RELEASE . $lang['commonCharset']; $info = base64_encode(serialize($info)); //install count require_once HDWIKI_ROOT . '/config.php'; require_once HDWIKI_ROOT . '/lib/util.class.php'; @util::hfopen('http://kaiyuan.hudong.com/count2/in.php?action=install', 0, 'info=' . urlencode($info)); $str = "<div id=\"wrapper1\"><span style=\"color:red\">{$lang['stepSetupSuccessTip']}</span><a href='../index.php'>{$lang['stepSetupGoTOIndex']}</a></div>"; $str .= '<iframe id="count" name="count" src="http://kaiyuan.hudong.com/count2/interface.php?info=' . $info . '" scrolling="no" width="455" style="height:370px" frameborder="0"></iframe>'; break; /*
public function install() { global $_M; require_once $this->savedir . 'install.class.php'; $install = new install(); @($install->step = $this->info['step']); if (method_exists($install, 'getfile')) { $copydir = $install->getfile(); } $copydir = $copydir ? $copydir : 'file/'; //安装文件 if ($copydir != 'notcopy') { $copyfile = $this->savedir . $copydir; $resource = opendir($copyfile); while (($file = readdir($resource)) !== false) { if ($file == '.' || $file == '..') { continue; } if (is_dir($copyfile . $file)) { if ($file == 'admin') { copydir($copyfile . "admin", PATH_WEB . $_M['config']['met_adminfile']); } else { copydir($copyfile . $file, PATH_WEB . $file); } } else { copyfile($copyfile . $file, PATH_WEB . $file); } } } //安装数据 $re = $install->dosql(); if ($re == 'complete' || !$re) { return $this->suc_data('complete', 0, $_M['word']['installation_complete']); } else { if ($re == 'next') { if (method_exists($install, 'html')) { $html_re = $install->html(); } if ($html_re) { $html = $html_re; } else { $html = "{$_M['word']['installation']}..."; } return $this->suc_data('install', $this->info['step'] + 1, $html); } else { if ($re == 'recheck') { return $this->suc_data('check', 1, $_M['word']['detection'] . '...'); } else { return $this->fail_data($re); } } } }
function copydir($source, $destination) { $source = dirpath($source); $destination = dirpath($destination); $result = true; if (!is_dir($source)) { //读取源目录 msg("源目录名称错误", 0); } if (!is_dir($destination)) { //读取目标目录 if (!mk_dir($destination)) { msg("无法创建目标目录", 0); } } $handle = opendir($source); //取得目录的句柄 while (($file = readdir($handle)) !== false) { if ($file != '.' && $file != '..') { $src = $source . "/" . $file; //源文件路径 $dtn = $destination . "/" . $file; //目标文件路径 if (is_dir($src)) { copydir($src, $dtn); } else { copyfile($src, $dtn); } //msg($src.'--->'.$dtn.'<br>'); } } closedir($handle); return $result; }
function copydir($src, $dst) { // 原目录,复制到的目录 if (!file_exists($src)) { return false; } $dir = opendir($src); @mkdir($dst, 0777, true); while (false !== ($file = readdir($dir))) { if ($file != '.' && $file != '..') { if (is_dir($src . '/' . $file)) { copydir($src . '/' . $file, $dst . '/' . $file); } else { copy($src . '/' . $file, $dst . '/' . $file); } } } closedir($dir); return true; }
function copydir($dirf, $dirt) { $mydir = @opendir($dirf); while ($file = @readdir($mydir)) { if (is_dir("{$dirf}/{$file}") && $file != "." && $file != "..") { if (!file_exists("{$dirt}/{$file}")) { if (!@mkdir("{$dirt}/{$file}")) { return false; } } if (!copydir("{$dirf}/{$file}", "{$dirt}/{$file}")) { return false; } } else { if (!is_dir("{$dirf}/{$file}")) { if (!@copy("{$dirf}/{$file}", "{$dirt}/{$file}")) { return false; } } } } return true; }
function copys($entrys, $dir, $path) { foreach ($entrys as $e) { $pa = $dir . '/' . $e; if (isPathNotPermission(processDirectory($path . '/' . $e))) { /* Entry not permission */ } else { if (@is_file($pa)) { if (!@copy($pa, $path . '/' . $e)) { return false; } } else { if (@is_dir($pa)) { if (!copydir($pa, $path)) { return false; } } else { return false; } } } } return true; }
function dosvn() { global $app_tmppath; $svntemppath = $app_tmppath . "svn/"; $sv = $_SESSION['setup_conf']['svn']; $root = $_SESSION['setup_conf']['conf']['app_root']; if (count($sv) > 0) { //deldir($svntemppath); foreach ($sv as $v => $s) { $temppath = $svntemppath . "{$v}/"; msg('正在从' . $s['SVN_URL'] . '上下载文件,请耐心等待……<br>'); $svn = new phpsvnclient($s['SVN_URL'], $s['SVN_USER'], $s['SVN_PWD']); $files = $svn->getDirectoryTree($s['SVN_DIR']); foreach ($files as $k => $f) { if ($f['type'] == 'file') { $content = $svn->getFile($f['path']); $file = str_replace($s['SVN_DIR'], $temppath, $f['path']); write_file($file, $content); } } } foreach ($sv as $v => $s) { $temppath = $svntemppath . "{$v}/"; copydir($temppath, $root . $s['DIR_PATH']); } } remark_setup(1); echo "<script language='JavaScript'>top.godourl(4);</script>"; }
..path_to_joomla/components/com_booklibrary/covers and ..path_to_joomla/components/com_booklibrary/ebooks to ..path_to_joomla/tmp/com_booklibrary/ manualy if you want to save electronic documents and picture of books"; } */ } } } if ($booklibrary_configuration['update']) { @mkdir($mosConfig_absolute_path . "/tmp/com_booklibrary/"); @mkdir($mosConfig_absolute_path . "/tmp/com_booklibrary/covers/"); @mkdir($mosConfig_absolute_path . "/tmp/com_booklibrary/ebooks/"); $dst = $mosConfig_absolute_path . "/tmp/com_booklibrary/covers"; $src = $mosConfig_absolute_path . "/components/com_booklibrary/covers"; copydir($src, $dst); $dst = $mosConfig_absolute_path . "/tmp/com_booklibrary/ebooks"; $src = $mosConfig_absolute_path . "/components/com_booklibrary/ebooks"; copydir($src, $dst); echo 'database saved'; } else { echo 'no update'; $db->SetQuery("DROP TABLE #__booklibrary"); $db->query(); $db->SetQuery("DROP TABLE #__booklibrary_categories"); $db->query(); $db->SetQuery("DROP TABLE #__booklibrary_lend"); $db->query(); $db->SetQuery("DROP TABLE #__booklibrary_lend_request"); $db->query(); $db->SetQuery("DROP TABLE #__booklibrary_files"); $db->query(); $db->SetQuery("DROP TABLE #__booklibrary_suggestion"); $db->query();
function copydir($dirfrom, $dirto, $cover = '') { $copyfailnum = 0; //如果遇到同名文件无法复制,则直接退出 if (is_file($dirto)) { die('遇到同名文件无法复制,' . $dirto); } //目标不存在 if (!file_exists($dirfrom)) { return $copyfailnum; } //如果目录不存在,则建立之 if (!file_exists($dirto)) { mkdir($dirto); } $handle = opendir($dirfrom); //打开当前目录 //循环读取文件 while (false !== ($file = readdir($handle))) { if ($file != '.' && $file != '..') { //排除"."和"." //生成源文件名 $filefrom = $dirfrom . DIRECTORY_SEPARATOR . $file; //生成目标文件名 $fileto = $dirto . DIRECTORY_SEPARATOR . $file; if (is_dir($filefrom)) { //如果是子目录,则进行递归操作 copydir($filefrom, $fileto, $cover); } else { //如果是文件,则直接用copy函数复制 if (!empty($cover)) { if (!copy($filefrom, $fileto)) { $copyfailnum++; //echo '复制'.$filefrom.'到'.$fileto.'失败'."<br />"; } } else { if (fileext($fileto) == 'html' && file_exists($fileto)) { } else { if (!copy($filefrom, $fileto)) { $copyfailnum++; //echo '复制'.$filefrom.'到'.$fileto.'失败'."<br />"; } } } } } } return $copyfailnum; }
echo " \n"; return false; } $modules = Framework::getModules(); $folders = []; foreach ($modules as $folder => $info) { $modulePath = $info['path']; if (is_dir($modulePath . 'public')) { if (\Sledgehammer\array_value($info, 'app')) { $folders[$modulePath . 'public'] = ''; } else { $folders[$modulePath . 'public'] = '/' . $folder; } } } foreach ($targetFolders as $targetFolder) { $fileCount = 0; echo "\nPopulating /" . $targetFolder . " ...\n"; foreach ($folders as $folder => $targetSuffix) { $targetPath = \Sledgehammer\PATH . $targetFolder . $targetSuffix; \Sledgehammer\mkdirs($targetPath); $fileCount += copydir($folder, $targetPath, array('.svn')); } echo ' ' . $fileCount . " files copied\n"; } if (isset($modules['minify'])) { include $modules['minify']['path'] . 'utils/minify_DocumentRoot.php'; } else { echo " done.\n"; } return true;
$fp = fopen($OUTPUT_DIR . $OUTPUT_FILE, "r"); $uncompressed = ""; while (!feof($fp)) { $uncompressed .= fgets($fp); } fclose($fp); $compressed = Minify_YUICompressor::minifyJs($uncompressed, array()); $fp = fopen($OUTPUT_DIR . $OUTPUT_FILE_COMPRESSED, "w"); fwrite($fp, $compressed); fclose($fp); echo "Finished building {$OUTPUT_DIR}{$OUTPUT_FILE_COMPRESSED} (" . filesize($OUTPUT_DIR . $OUTPUT_FILE_COMPRESSED) . " bytes): Took " . (microtime_float() - $time_start) . "s\n"; echo "\nCopying Resources to {$OUTPUT_DIR}{$OUTPUT_RESOURCES}\n"; if (!is_dir($OUTPUT_DIR . $OUTPUT_RESOURCES)) { mkdir($OUTPUT_DIR . 'resources'); } copydir($RESOURCES_DIR, $OUTPUT_DIR . $OUTPUT_RESOURCES); echo "\nCopying Documentation to {$OUTPUT_DIR}{$OUTPUT_DOCUMENTATION}\n"; if (!is_dir($OUTPUT_DIR . $OUTPUT_DOCUMENTATION)) { mkdir($OUTPUT_DIR . $OUTPUT_DOCUMENTATION); } copydir($DOCUMENTATION_DIR, $OUTPUT_DIR . $OUTPUT_DOCUMENTATION, '*'); echo "\nCopying Libraries to {$OUTPUT_DIR}{$OUTPUT_LIBS}\n"; if (!is_dir($OUTPUT_DIR . $OUTPUT_LIBS)) { mkdir($OUTPUT_DIR . $OUTPUT_LIBS); } copydir($LIB_DIR, $OUTPUT_DIR . $OUTPUT_LIBS); echo "\nCopying Build Files and LICENSE\n"; copy("LICENSE", $OUTPUT_DIR . "/LICENSE"); echo "\nCleaning Up\n\n"; rmdir($TMP_DIR); echo "Build complete took " . (microtime_float() - $build_start) . "s\n\n\r";
if (empty($_POST['path'])) { echo 'Chưa nhập đầy đủ thông tin'; } else { if ($dir == processDirectory($_POST['path'])) { echo 'Đường dẫn mới phải khác đường dẫn hiện tại'; } else { if (!is_dir($_POST['path'])) { echo 'Đường dẫn mới không tồn tại'; } else { if (isPathNotPermission(processDirectory($_POST['path']))) { echo 'Bạn không thể sao chép thư mục tới đường dẫn của File Manager'; } else { if (isPathNotPermission(processDirectory($_POST['path'] . '/' . $name))) { echo 'Bạn không thể sao chép thư mục giống tên tới thư mục chứa thư mục của File Manager'; } else { if (!copydir($dir . '/' . $name, processDirectory($_POST['path']))) { echo 'Sao chép thư mục thất bại'; } else { goURL('index.php?dir=' . $dirEncode . $pages['paramater_1']); } } } } } } echo '</div>'; } echo '<div class="list"> <span class="bull">•</span><span>' . printPath($dir . '/' . $name, true) . '</span><hr/> <form action="folder_copy.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '" method="post"> <span class="bull">•</span>Đường dẫn thư mục mới:<br/>