F
F
fanov2020-05-13 22:07:09
PHP
fanov, 2020-05-13 22:07:09

How to display a link to a file in Bitrix?

Created the FILE_PDF property for the infobox, type "File"
5ebc452fae2ea859232785.png
I want to display a link to the file

<?foreach ($arResult["PROPERTIES"]["FILE_PDF"]["VALUE"] as $value):?>
  <a href="<?=CFile::GetPath($value)?>">Скачать</a>
<?endforeach?>

But nothing comes out. What can be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2020-05-14
@anton99zel

$file = CFile::GetFileArray($arResult["PROPERTIES"]["FILE_PDF"]["VALUE"]);
print_r($file);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question