本文整理汇总了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;
}