当前位置: 首页>>代码示例>>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;未经允许,请勿转载。