本文整理汇总了PHP中CopyDirFiles函数的典型用法代码示例。如果您正苦于以下问题:PHP CopyDirFiles函数的具体用法?PHP CopyDirFiles怎么用?PHP CopyDirFiles使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CopyDirFiles函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InstallFiles
public function InstallFiles()
{
CopyDirFiles($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/".$this->MODULE_ID."/install/themes/", $_SERVER['DOCUMENT_ROOT']."/bitrix/themes/", true, true );
CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/js/", $_SERVER["DOCUMENT_ROOT"]."/bitrix/js/", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/'.$this->MODULE_ID.'/install/components/', $_SERVER["DOCUMENT_ROOT"] . '/bitrix/components/', true, true);
return true;
}
示例2: InstallFiles
function InstallFiles()
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/public/mobile/", $_SERVER["DOCUMENT_ROOT"] . "/mobile/", True, True);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/install/templates/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/", True, True);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/install/components/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
$default_site_id = CSite::GetDefSite();
if ($default_site_id) {
$arAppTempalate = array("SORT" => 1, "CONDITION" => "CSite::InDir('/mobile/')", "TEMPLATE" => "mobile_app");
$arFields = array("TEMPLATE" => array());
$dbTemplates = CSite::GetTemplateList($default_site_id);
$mobileAppFound = false;
while ($template = $dbTemplates->Fetch()) {
if ($template["TEMPLATE"] == "mobile_app") {
$mobileAppFound = true;
$template = $arAppTempalate;
}
$arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
}
if (!$mobileAppFound) {
$arFields["TEMPLATE"][] = $arAppTempalate;
}
$obSite = new CSite();
$arFields["LID"] = $default_site_id;
$obSite->Update($default_site_id, $arFields);
}
CUrlRewriter::ReindexFile("/mobile/webdav/index.php");
CUrlRewriter::ReindexFile("/mobile/disk/index.php");
CUrlRewriter::Add(array("CONDITION" => "#^/mobile/disk/(?<hash>[0-9]+)/download#", "RULE" => "download=1&objectId=\$1", "ID" => "bitrix:mobile.disk.file.detail", "PATH" => "/mobile/disk/index.php"));
return true;
}
示例3: DoInstall
public function DoInstall()
{
global $APPLICATION, $adminPage, $USER, $adminMenu, $adminChain;
if ($GLOBALS['APPLICATION']->GetGroupRight('main') < 'W') {
return;
}
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/components/" . $this->MODULE_ID, $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/" . $this->MODULE_ID, true, true);
if (is_array($this->NEED_MODULES) && !empty($this->NEED_MODULES)) {
foreach ($this->NEED_MODULES as $module) {
if (!IsModuleInstalled($module)) {
$this->ShowForm('ERROR', GetMessage('DADATA_SUGGESTIONS_NEED_MODULES', array('#MODULE#' => $module)));
}
}
}
if (strlen($this->NEED_MAIN_VERSION) <= 0 || version_compare(SM_VERSION, $this->NEED_MAIN_VERSION) >= 0) {
if ($this->InstallDB()) {
$this->ShowForm('OK', GetMessage('MOD_INST_OK'), 'install');
} else {
$strError = '';
if ($ex = $APPLICATION->GetException()) {
$strError = $ex->GetString();
} else {
$strError = GetMessage('DADATA_SUGGESTIONS_UNKNOWN_ERR_INSTALL');
}
$this->ShowForm('ERROR', GetMessage('DADATA_SUGGESTIONS_NOT_INSTALL', array('#ERR#' => $strError)));
}
} else {
$this->ShowForm('ERROR', GetMessage('DADATA_SUGGESTIONS_NEED_RIGHT_VER', array('#NEED#' => $this->NEED_MAIN_VERSION)));
}
}
示例4: InstallFiles
function InstallFiles()
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/translate/install/admin", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/translate/install/images", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/images/translate", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/translate/install/themes", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/themes", true, true);
return true;
}
示例5: DoInstall
function DoInstall()
{
CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . self::MODULE_ID . '/install/public_html/', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/', true, true);
RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', self::MODULE_ID, 'UserDataColor', 'GetIBlockPropertyDescription');
// RegisterModuleDependences('main', 'OnUserTypeBuildList', self::MODULE_ID, 'UserDataColor', 'GetUserTypeDescription');
RegisterModule(self::MODULE_ID);
}
示例6: InstallFiles
function InstallFiles($arParams = array())
{
if (is_dir($p = $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/'.self::MODULE_ID.'/admin'))
{
if ($dir = opendir($p))
{
while (false !== $item = readdir($dir))
{
if ($item == '..' || $item == '.' || $item == 'menu.php')
continue;
file_put_contents($file = $_SERVER['DOCUMENT_ROOT'].'/bitrix/admin/'.self::MODULE_ID.'_'.$item,
'<'.'? require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/'.self::MODULE_ID.'/admin/'.$item.'");?'.'>');
}
closedir($dir);
}
}
CopyDirFiles(
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/images/",
$_SERVER["DOCUMENT_ROOT"]."/bitrix/images/".$this->MODULE_ID."/", true, true
);
CopyDirFiles(
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/js/",
$_SERVER["DOCUMENT_ROOT"]."/bitrix/js/".$this->MODULE_ID."/", true, true
);
CopyDirFiles(
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/themes/",
$_SERVER["DOCUMENT_ROOT"]."/bitrix/themes/", true, true
);
return true;
}
示例7: installFiles
public function installFiles()
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/sale_payment/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/php_interface/include/sale_payment", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/components/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/admin/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin", true, true);
return true;
}
示例8: InstallFiles
function InstallFiles()
{
global $APPLICATION;
CopyDirFiles(
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/admin",
$_SERVER["DOCUMENT_ROOT"]."/bitrix/admin"
);
CopyDirFiles(
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/images",
$_SERVER["DOCUMENT_ROOT"]."/bitrix/images/".$this->MODULE_ID,
true,
true
);
CopyDirFiles(
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/themes",
$_SERVER["DOCUMENT_ROOT"]."/bitrix/themes",
true,
true
);
CopyDirFiles(
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/js",
$_SERVER["DOCUMENT_ROOT"]."/bitrix/js/".$this->MODULE_ID,
true,
true
);
$APPLICATION->SetFileAccessPermission("/bitrix/admin/lol_pdd_msg.php", array("*" => "R"));
return true;
}
示例9: InstallFiles
function InstallFiles()
{
if(CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/citfact.edutemplate/install/wizards", $_SERVER["DOCUMENT_ROOT"]."/bitrix/wizards", true, true))
return true;
if(CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/citfact.edutemplate/wizards", $_SERVER["DOCUMENT_ROOT"]."/bitrix/wizards", true, true))
return true;
}
示例10: InstallFiles
function InstallFiles($arParams = array())
{
if (is_dir($p = $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/'.self::MODULE_ID.'/admin'))
{
if ($dir = opendir($p))
{
while (false !== $item = readdir($dir))
{
if ($item == '..' || $item == '.' || $item == 'menu.php')
continue;
file_put_contents($file = $_SERVER['DOCUMENT_ROOT'].'/bitrix/admin/'.self::MODULE_ID.'_'.$item,
'<'.'? require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/'.self::MODULE_ID.'/admin/'.$item.'");?'.'>');
}
closedir($dir);
}
}
if (is_dir($p = $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/'.self::MODULE_ID.'/install/components'))
{
if ($dir = opendir($p))
{
while (false !== $item = readdir($dir))
{
if ($item == '..' || $item == '.')
continue;
CopyDirFiles($p.'/'.$item, $_SERVER['DOCUMENT_ROOT'].'/bitrix/components/'.$item, $ReWrite = True, $Recursive = True);
}
closedir($dir);
}
}
CopyDirFiles($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/'.self::MODULE_ID.'/install/js', $_SERVER['DOCUMENT_ROOT'].'/bitrix/js/liveapi', $ReWrite = True, $Recursive = True);
return true;
}
示例11: InstallFiles
function InstallFiles()
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/js/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/js/", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/admin/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin/", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/components/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/", true, true);
return true;
}
示例12: InstallFiles
function InstallFiles()
{
if ($_ENV['COMPUTERNAME'] != 'BX') {
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/js", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/js", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/im/install/activities', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/activities', true, true);
CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/im/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin', true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/templates", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates", True, True);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/public", $_SERVER["DOCUMENT_ROOT"] . "/", True, True);
$default_site_id = CSite::GetDefSite();
if ($default_site_id) {
$arAppTempalate = array("SORT" => 1, "CONDITION" => "CSite::InDir('/desktop_app/')", "TEMPLATE" => "desktop_app");
$arFields = array("TEMPLATE" => array());
$dbTemplates = CSite::GetTemplateList($default_site_id);
$desktopAppFound = false;
while ($template = $dbTemplates->Fetch()) {
if ($template["TEMPLATE"] == "desktop_app") {
$desktopAppFound = true;
$template = $arAppTempalate;
}
$arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
}
if (!$desktopAppFound) {
$arFields["TEMPLATE"][] = $arAppTempalate;
}
$obSite = new CSite();
$arFields["LID"] = $default_site_id;
$obSite->Update($default_site_id, $arFields);
}
$GLOBALS["APPLICATION"]->SetFileAccessPermission('/desktop_app/', array("*" => "R"));
}
return true;
}
示例13: InstallFiles
function InstallFiles($arParams = array())
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/perfmon/install/admin/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin");
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/perfmon/install/themes/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/themes/", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/perfmon/install/images/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/images", true, true);
return true;
}
示例14: InstallFiles
function InstallFiles($arParams = array())
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".self::MODULE_ID."/install/admin/", $_SERVER["DOCUMENT_ROOT"]."/bitrix/admin", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".self::MODULE_ID."/install/themes/", $_SERVER["DOCUMENT_ROOT"]."/bitrix/themes", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".self::MODULE_ID."/install/js/", $_SERVER["DOCUMENT_ROOT"]."/bitrix/js", true, true);
return true;
}
示例15: InstallFiles
function InstallFiles()
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/bitrix.eshop/install/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
//CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/bitrix.eshop/install/wizards/bitrix/store.catalog", $_SERVER["DOCUMENT_ROOT"]."/bitrix/wizards/bitrix/store.catalog", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/bitrix.eshop/install/wizards/bitrix/eshop.mobile", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/wizards/bitrix/eshop.mobile", true, true);
return true;
}