本文整理汇总了PHP中Bitrix\Main\IO\File::getPhysicalPath方法的典型用法代码示例。如果您正苦于以下问题:PHP File::getPhysicalPath方法的具体用法?PHP File::getPhysicalPath怎么用?PHP File::getPhysicalPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bitrix\Main\IO\File
的用法示例。
在下文中一共展示了File::getPhysicalPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: microtime
$bCanEdit = false;
}
//need fm_lpa for every .php file, even with no php code inside
if ($bCanEdit && !$USER->CanDoOperation('edit_php') && in_array(GetFileExtension($currentFilePath), GetScriptFileExt()) && !$USER->CanDoFileOperation('fm_lpa', array(SITE_ID, $currentFilePath))) {
$bCanEdit = false;
}
if ($bCanEdit && IsModuleInstalled("fileman") && !($USER->CanDoOperation("fileman_admin_files") && $USER->CanDoOperation("fileman_edit_existent_files"))) {
$bCanEdit = false;
}
if ($bCanEdit) {
echo $APPLICATION->IncludeStringBefore();
$BX_GLOBAL_AREA_EDIT_ICON = true;
}
}
}
define("START_EXEC_PROLOG_AFTER_2", microtime());
$GLOBALS["BX_STATE"] = "WA";
$APPLICATION->RestartWorkarea(true);
//magically replacing the current file with another one
$event = new Main\Event("main", "OnFileRewrite", array("path" => Main\Context::getCurrent()->getRequest()->getScriptFile()));
$event->send();
foreach ($event->getResults() as $evenResult) {
if (($result = $evenResult->getParameters()) != '') {
$file = new Main\IO\File($_SERVER["DOCUMENT_ROOT"] . $result);
if ($file->isExists()) {
//only the first result matters
include $file->getPhysicalPath();
die;
}
}
}