本文整理汇总了PHP中CIBlock::makeFileArray方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlock::makeFileArray方法的具体用法?PHP CIBlock::makeFileArray怎么用?PHP CIBlock::makeFileArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlock
的用法示例。
在下文中一共展示了CIBlock::makeFileArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($strWarning == '')
{
$bs = new CIBlockElement;
$arPREVIEW_PICTURE = CIBlock::makeFileArray(
array_key_exists("PREVIEW_PICTURE", $_FILES)? $_FILES["PREVIEW_PICTURE"]: $_REQUEST["PREVIEW_PICTURE"],
${"PREVIEW_PICTURE_del"} === "Y",
${"PREVIEW_PICTURE_descr"}
);
if ($arPREVIEW_PICTURE["error"] == 0)
$arPREVIEW_PICTURE["COPY_FILE"] = "Y";
$arDETAIL_PICTURE = CIBlock::makeFileArray(
array_key_exists("DETAIL_PICTURE", $_FILES)? $_FILES["DETAIL_PICTURE"]: $_REQUEST["DETAIL_PICTURE"],
${"DETAIL_PICTURE_del"} === "Y",
${"DETAIL_PICTURE_descr"}
);
if ($arDETAIL_PICTURE["error"] == 0)
$arDETAIL_PICTURE["COPY_FILE"] = "Y";
$arFields = array(
"ACTIVE" => $_POST["ACTIVE"],
"MODIFIED_BY" => $USER->GetID(),
"IBLOCK_ID" => $IBLOCK_ID,
"ACTIVE_FROM" => $_POST["ACTIVE_FROM"],
"ACTIVE_TO" => $_POST["ACTIVE_TO"],
"SORT" => $_POST["SORT"],
"NAME" => $_POST["NAME"],
"CODE" => trim($_POST["CODE"], " \t\n\r"),
"TAGS" => $_POST["TAGS"],
示例2: array
}
if (array_key_exists("PREVIEW_PICTURE", $arFields))
{
$arFields["PREVIEW_PICTURE"] = CIBlock::makeFileArray(
$arFields["PREVIEW_PICTURE"],
$_REQUEST["FIELDS_del"][$TYPE.$ID]["PREVIEW_PICTURE"] === "Y",
$_REQUEST["FIELDS_descr"][$TYPE.$ID]["PREVIEW_PICTURE"]
);
}
if (array_key_exists("DETAIL_PICTURE", $arFields))
{
$arFields["DETAIL_PICTURE"] = CIBlock::makeFileArray(
$arFields["DETAIL_PICTURE"],
$_REQUEST["FIELDS_del"][$TYPE.$ID]["DETAIL_PICTURE"] === "Y",
$_REQUEST["FIELDS_descr"][$TYPE.$ID]["DETAIL_PICTURE"]
);
}
if(!is_array($arFields["PROPERTY_VALUES"]))
$arFields["PROPERTY_VALUES"] = array();
$bFieldProps = array();
foreach($arFields as $k=>$v)
{
if(
$k != "PROPERTY_VALUES"
&& strncmp($k, "PROPERTY_", 9) == 0
)
{
$prop_id = substr($k, 9);
示例3: foreach
foreach ($arPropertyValueCombinationResult[$imageRowId] as $srcKey => $srcValue) {
if ($srcValue == '-1') {
continue;
}
if (!isset($arFilePropertiesExt[$srcKey]) && $srcKey != 'DETAIL' && $srcKey != 'ANNOUNCE') {
continue;
}
switch ($srcKey) {
case 'ANNOUNCE':
$arIBlockElementAdd['PREVIEW_PICTURE'] = CIBlock::makeFileArray($srcValue, false);
if ($arIBlockElementAdd['PREVIEW_PICTURE']['error'] == 0) {
$arIBlockElementAdd['PREVIEW_PICTURE']['COPY_FILE'] = 'Y';
}
break;
case 'DETAIL':
$arIBlockElementAdd['DETAIL_PICTURE'] = CIBlock::makeFileArray($srcValue, false);
if ($arIBlockElementAdd['DETAIL_PICTURE']['error'] == 0) {
$arIBlockElementAdd['DETAIL_PICTURE']['COPY_FILE'] = 'Y';
}
break;
default:
if (is_array($srcValue)) {
$arPropertySaveValues[$srcKey] = array();
foreach ($srcValue as $fileID => $fileValue) {
$arPropertySaveValues[$srcKey][$fileID] = CIBlock::makeFilePropArray($srcValue[$fileID], false);
}
} else {
$arPropertySaveValues[$srcKey] = CIBlock::makeFilePropArray($srcValue, false);
}
break;
}