• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/application.php
  • Класс: BitrixMainApplication
  • Вызов: Application::getPersonalRoot
static function getPersonalRoot()
{
	static $personalRoot = null;
	if ($personalRoot != null)
		return $personalRoot;

	$context = Application::getInstance()->getContext();
	if ($context != null)
	{
		$server = $context->getServer();
		if ($server != null)
			return $personalRoot = $server->getPersonalRoot();
	}

	return $_SERVER["BX_PERSONAL_ROOT"] ?? '/bitrix';
}