S
S
sg_exe2015-02-02 14:47:15
PHP
sg_exe, 2015-02-02 14:47:15

How to write a file to the Bitrix infoblock element property?

I have gifs in the catalog, tell me how can I write this gif to the infoblock property?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Emelyanov, 2015-02-02
@babarun

a. You pass an array to the property

CFile::MakeFileArray($_SERVER["DOCUMENT_ROOT"]."/image.gif")

b.1. Save the file:
dev.1c-bitrix.ru/api_help/main/reference/cfile/sav...
b.2. Save the resulting file ID in St. IB
s. The simplest option, affecting only St.
$arFile = CFile::MakeFileArray($_SERVER["DOCUMENT_ROOT"]."/image.gif");
CIBlockElement::SetPropertyValueCode($ELEMENT_ID, "picture", $arFile);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question