本文整理汇总了PHP中CFileMan::CheckOnAllowedComponents方法的典型用法代码示例。如果您正苦于以下问题:PHP CFileMan::CheckOnAllowedComponents方法的具体用法?PHP CFileMan::CheckOnAllowedComponents怎么用?PHP CFileMan::CheckOnAllowedComponents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileMan
的用法示例。
在下文中一共展示了CFileMan::CheckOnAllowedComponents方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
}
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)
{
if (!CFileMan::CheckOnAllowedComponents($filesrc_for_save))
{
$str_err = $APPLICATION->GetException();
if($str_err && ($err = $str_err ->GetString()))
$strWarning .= $err;
$bVarsFromForm = true;
}
}
if(strlen($strWarning) <= 0)
{
$f = $io->GetFile($abs_path);
$arUndoParams = array(
'module' => 'fileman',
'undoType' => 'edit_file',
'undoHandler' => 'CFileman::UndoEditFile',
示例2: strpos
$body = '<body>';
$wa = '#WORK_AREA#';
$body_pos = strpos($ucont, $body);
$sp_pos = strpos($ucont, strtolower($sp));
$wa_pos = strpos($ucont, strtolower($wa), $body_pos);
if ($body_pos !== false && $sp_pos === false) // Add $APPLICATION->ShowPanel();
$CONTENT = substr($CONTENT, 0, $body_pos + strlen($body)).$sp.substr($CONTENT, $body_pos + strlen($body));
if ($wa_pos === false)
$CONTENT .= $wa;
}
if(!class_exists('CFileMan'))
CModule::IncludeModule("fileman");
if(class_exists('CFileMan') && method_exists(CFileMan, CheckOnAllowedComponents))
{
if (!CFileMan::CheckOnAllowedComponents($CONTENT))
{
$str_err = $APPLICATION->GetException();
if($str_err && ($err = $str_err ->GetString()))
$strError .= $err;
$bVarsFromForm = true;
}
}
if(strlen($strError) <= 0)
{
$ST = new CSiteTemplate();
$arFields = Array(
"ID" => $ID,
"NAME" => $NAME,
"DESCRIPTION" => $DESCRIPTION,