A
A
avshivtseva2017-05-19 16:08:30
PHP
avshivtseva, 2017-05-19 16:08:30

Bitrix infoblock update script where to register?

There is an infoblock, you need to update its property through the script,
$ib = new CIBlock;
$res = $ib->Update(2, array(
"SECTION_PROPERTY" => "Y",
));
Where should this be written?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dave Hornigan, 2018-08-08
@a_pussycan

$dir = 'img/';
$images = scandir($dir);
for ($i = 0; $i < count($images); $i++) {
  if ($images[$i] != '.' && $images[$i] != '..') {
    echo '<a href="' . $dir . $images[$i] . '" target="_blank"><img src=' . $dir . $images[$i] . ' style="width: 200px;"></a>';
  }
}

A
Alexey Emelyanov, 2017-05-19
@babarun

You can create a script in the root of the site and call it through the browser, just don't forget to delete it later.
But for such one-time things it is better to use the php console /bitrix/admin/php_command_line.php?lang=ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question