Реализовал загрузку динамической информации в инфоблок:
Вставляем в инфоблок #PAGE_INFO#
Далее:
init.php
if ($_SERVER["REQUEST_URI"] == "/services/info/") {
AddEventHandler("main", "OnEndBufferContent", "ChangeMyContent");
function ChangeMyContent(&$content)
{
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, "/pages/info.php";
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
$homepage = curl_exec($handle);
curl_close($handle);
$search = "#PAGE_INFO#";
$replace = "$homepage";
$content = str_replace($search, $replace, $content);
}
}
Работает!
Вставляем в инфоблок #PAGE_INFO#
Далее:
init.php
if ($_SERVER["REQUEST_URI"] == "/services/info/") {
AddEventHandler("main", "OnEndBufferContent", "ChangeMyContent");
function ChangeMyContent(&$content)
{
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, "/pages/info.php";
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
$homepage = curl_exec($handle);
curl_close($handle);
$search = "#PAGE_INFO#";
$replace = "$homepage";
$content = str_replace($search, $replace, $content);
}
}
Работает!