From a0092d6a1068fb79eb03fe5eaf27e7ed785dbb13 Mon Sep 17 00:00:00 2001 From: macbaze Date: Thu, 26 Sep 2019 17:29:12 +0300 Subject: [PATCH 1/2] just wrapper. no error handling. native caching --- infoblocksWorker.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 infoblocksWorker.php diff --git a/infoblocksWorker.php b/infoblocksWorker.php new file mode 100644 index 0000000..bcbd735 --- /dev/null +++ b/infoblocksWorker.php @@ -0,0 +1,18 @@ + $arSelect, 'filter' => $arFilter, 'order' => $arSort, 'cache' => array('ttl' => 3600))); + } +} + +//(new infoblocksWorker)->getResult(array('ID'), array('=IBLOCK_ID' => 5), array('ID' => 'DESC')); +//require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php"); +?> \ No newline at end of file From ef5fa142c80553bf6aac78aa249fe62d8945ffaa Mon Sep 17 00:00:00 2001 From: macbaze Date: Thu, 26 Sep 2019 17:29:28 +0300 Subject: [PATCH 2/2] tested with bash and php7 --- getLastNews.php | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 getLastNews.php diff --git a/getLastNews.php b/getLastNews.php new file mode 100644 index 0000000..e20d0ea --- /dev/null +++ b/getLastNews.php @@ -0,0 +1,10 @@ +#!/usr/bin/php +channel->item[$x]; + echo "\t{$cur_item->title}\n\t{$cur_item->link}\n\t".trim($cur_item->description)."\n\n"; +} +?> \ No newline at end of file