• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/mysql/database.php
  • Класс: CDatabaseMysql
  • Вызов: CDatabaseMysql::ConnectInternal
protected function ConnectInternal()
{
	$dbHost = $this->DBHost;
	$dbPort = null;
	if (($pos = mb_strpos($dbHost, ":")) !== false)
	{
		$dbPort = intval(mb_substr($dbHost, $pos + 1));
		$dbHost = mb_substr($dbHost, 0, $pos);
	}

	$persistentPrefix = (DBPersistent && !$this->bNodeConnection ? "p:" : "");

	$this->db_Conn = mysqli_connect($persistentPrefix . $dbHost, $this->DBLogin, $this->DBPassword, $this->DBName, $dbPort);

	if (!$this->db_Conn)
	{
		$error = "[" . mysqli_connect_errno() . "] " . mysqli_connect_error();
		if ($this->debug)
		{
			echo "
Error! mysqli_connect()
" . $error . "
"; } SendError("Error! mysqli_connect()n" . $error . "n"); return false; } return true; }