本文整理匯總了PHP中CFileman::GetTemplateContent方法的典型用法代碼示例。如果您正苦於以下問題:PHP CFileman::GetTemplateContent方法的具體用法?PHP CFileman::GetTemplateContent怎麽用?PHP CFileman::GetTemplateContent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CFileman
的用法示例。
在下文中一共展示了CFileman::GetTemplateContent方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
}
$arTemplates = CFileman::GetFileTemplates(LANGUAGE_ID, array($site_template));
if(strlen($template)>0)
{
for ($i=0; $i<count($arTemplates); $i++)
{
if($arTemplates[$i]["file"] == $template)
{
$filesrc_tmp = CFileman::GetTemplateContent($arTemplates[$i]["file"], LANGUAGE_ID, array($site_template));
break;
}
}
}
else
$filesrc_tmp = CFileman::GetTemplateContent($arTemplates[0]["file"], LANGUAGE_ID, array($site_template));
}
if($REQUEST_METHOD=="POST" && strlen($save)>0)
{
if(!check_freetrix_sessid())
{
$strWarning = GetMessage("FILEMAN_SESSION_EXPIRED");
$bVarsFromForm = true;
}
// lpa was denied earlier, so use file src as is
$filesrc_for_save = $_POST['filesrc'];
if(strlen($strWarning) <= 0)
{
示例2: substr
}
if (strlen($sectionname) > 0) {
if (COption::GetOptionString($module_id, "log_page", "Y") == "Y") {
$res_log['path'] = substr($pathto, 1);
CEventLog::Log("content", "SECTION_ADD", "fileman", "", serialize($res_log));
}
$APPLICATION->SaveFileContent($DOC_ROOT . $pathto . "/.section.php", "<?\n\$sSectionName=\"" . CFileMan::EscapePHPString($sectionname) . "\";\n?>");
}
if ($e = $APPLICATION->GetException()) {
$strNotice = $e->msg;
} else {
if ($USER->CanDoFileOperation('fm_create_new_file', $arPath) && $USER->CanDoOperation('fileman_admin_files') && $mkindex == "Y") {
if ($toedit == "Y") {
LocalRedirect("/bitrix/admin/fileman_html_edit.php?" . $addUrl . "&site=" . $site . "&template=" . Urlencode($template) . "&path=" . UrlEncode($pathto) . "&filename=index.php&new=Y" . (strlen($back_url) <= 0 ? "" : "&back_url=" . UrlEncode($back_url)) . (strlen($gotonewpage) <= 0 ? "" : "&gotonewpage=" . UrlEncode($gotonewpage)) . (strlen($backnewurl) <= 0 ? "" : "&backnewurl=" . UrlEncode($backnewurl)));
} else {
$APPLICATION->SaveFileContent($DOC_ROOT . $pathto . "/index.php", CFileman::GetTemplateContent($template));
}
}
}
if ($e = $APPLICATION->GetException()) {
$strNotice = $e->msg;
} elseif (strlen($apply) <= 0 && $strNotice == '') {
if (strlen($back_url) > 0) {
LocalRedirect("/" . ltrim($back_url, "/"));
} else {
$arPathtoParsed = CFileMan::ParsePath(array($site, $pathto), false, false, "", $logical == "Y");
LocalRedirect("/bitrix/admin/fileman_admin.php?" . $addUrl . "&site=" . $site . "&path=" . UrlEncode($arPathtoParsed["PREV"]));
}
}
}
}