• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/httpresponse.php
  • Класс: BitrixMainHttpResponse
  • Вызов: HttpResponse::flush
public function flush($text = '')
{
	//clear all buffers - the response is responsible alone for its content
	while (@ob_end_clean());

	if (function_exists('fastcgi_finish_request'))
	{
		//php-fpm
		$this->writeHeaders();
		$this->writeBody($text);

		fastcgi_finish_request();
	}
	else
	{
		//apache handler
		ob_start();

		$this->writeBody($text);

		$size = ob_get_length();

		$this->addHeader('Content-Length', $size);

		$this->writeHeaders();

		ob_end_flush();
		@ob_flush();
		flush();
	}
}