當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CUrlRewriter::add方法代碼示例

本文整理匯總了PHP中CUrlRewriter::add方法的典型用法代碼示例。如果您正苦於以下問題:PHP CUrlRewriter::add方法的具體用法?PHP CUrlRewriter::add怎麽用?PHP CUrlRewriter::add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CUrlRewriter的用法示例。


在下文中一共展示了CUrlRewriter::add方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: InstallFiles

 function InstallFiles()
 {
     global $APPLICATION;
     if ($_ENV["COMPUTERNAME"] != 'BX') {
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/admin", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin", true);
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/js", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/js", true, true);
         CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/disk/install/tools/', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/tools', true, true);
         CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/disk/install/services/', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/services', true, true);
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/images", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/images", true, true);
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/public", $_SERVER["DOCUMENT_ROOT"] . "/", true, true);
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/webdav", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/webdav", true, true);
         CUrlRewriter::add(array("CONDITION" => "#^/docs/pub/(?<hash>[0-9a-f]{32})/(?<action>[0-9a-zA-Z]+)/\\?#", "RULE" => "hash=\$1&action=\$2&", "ID" => "bitrix:disk.external.link", "PATH" => "/docs/pub/index.php"));
         CUrlRewriter::add(array("CONDITION" => "#^/disk/(?<action>[0-9a-zA-Z]+)/(?<fileId>[0-9]+)/\\?#", "RULE" => "action=\$1&fileId=\$2&", "ID" => "bitrix:disk.services", "PATH" => "/bitrix/services/disk/index.php"));
         $APPLICATION->SetFileAccessPermission('/bitrix/tools/disk/', array('*' => 'R'));
         $APPLICATION->SetFileAccessPermission('/bitrix/services/disk/', array('*' => 'R'));
         $APPLICATION->SetFileAccessPermission('/docs/pub/', array('*' => 'R'));
         $APPLICATION->SetFileAccessPermission('/bitrix/admin/disk_bizproc_activity_settings.php', array('2' => 'R'));
         $APPLICATION->SetFileAccessPermission('/bitrix/admin/disk_bizproc_selector.php', array('2' => 'R'));
         $APPLICATION->SetFileAccessPermission('/bitrix/admin/disk_bizproc_wf_settings.php', array('2' => 'R'));
     }
     return true;
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:23,代碼來源:index.php


注:本文中的CUrlRewriter::add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。