php bitrix init.php
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php bitrix init.php相关的知识,希望对你有一定的参考价值。
<?
function bx_include($file, $type = '') {
global $APPLICATION;
$langID = LANGUAGE_ID;
$file = str_replace(".", "/", $file);
$path = $_SERVER['DOCUMENT_ROOT'] . $APPLICATION->GetTemplatePath("include_areas/{$langID}/{$file}.php");
if ($type) {
$content = file_get_contents($path);
switch ($type) {
case 'PHONE':
$content = preg_replace('/[ \-+()]/', '', $content);
break;
default:
break;
}
echo $content;
} else {
return $APPLICATION->IncludeComponent("bitrix:main.include", "apso", Array(
"COMPONENT_TEMPLATE" => ".default",
"AREA_FILE_SHOW" => "file", // Показывать включаемую область
"PATH" => $APPLICATION->GetTemplatePath("include_areas/{$langID}/{$file}.php"), // Путь к файлу области
"EDIT_TEMPLATE" => "", // Шаблон области по умолчанию,
"TYPE" => $type
), false
);
}
}
以上是关于php bitrix init.php的主要内容,如果未能解决你的问题,请参考以下文章
php bitrix-php任务
php 的Bitrix的PHP
php bitrix-php crm联系
php bitrix-php crm领先
php bitrix-php crm.company
php bitrix-php crm.deal