ob_start
��������� ����������� ������.
��������� :
void ob_start([string output_callback])
����� ������ ���� ������� ���������� ����������� ������ �, ���� ��� �������, ������� �� ����������� ������ �� ����� ������� ��������, � ����� ����������� �� ���������� ������ PHP.
���������� ������ ����� ���� ����������� � ��������� ���������� �������� ob_get_contents(). ��� ������ ����������� �� ������ ������������ ������� ob_end_flush(). ������� ���������� ������ ��������� ������� ob_end_clean().
� ��������� output_callback ����� ������� �������, ������� ����� ������������� ���������� ��� ������ ����������� ������. ������ ��� ������������ ��� ����������� ����������� ������ ����� ������� (��������, ������). ����� ��� ������ ������� ob_end_flush() � ��������� ������� ����� ������������ ���������� ������, � ��, ��� ��� ���������, ����� �������� (��������, ���� ������� �� ������ ������ ��������).
����������� ����� ���� ���������, � ����� ��� �������������� �������������� �����������; � ����������, ��������� �� ������ ������� ������, ����� ���������� � ����� �������� ������. �� ���������, ��� ��� ������ ����� ��������������� ����������� ���������� �������� ������� ob_end_flush() ������� �� ���, ������� ���� ������� ob_start().
��������� ����������� ������.
��������� :
void ob_start([string output_callback])
����� ������ ���� ������� ���������� ����������� ������ �, ���� ��� �������, ������� �� ����������� ������ �� ����� ������� ��������, � ����� ����������� �� ���������� ������ PHP.
���������� ������ ����� ���� ����������� � ��������� ���������� �������� ob_get_contents(). ��� ������ ����������� �� ������ ������������ ������� ob_end_flush(). ������� ���������� ������ ��������� ������� ob_end_clean().
� ��������� output_callback ����� ������� �������, ������� ����� ������������� ���������� ��� ������ ����������� ������. ������ ��� ������������ ��� ����������� ����������� ������ ����� ������� (��������, ������). ����� ��� ������ ������� ob_end_flush() � ��������� ������� ����� ������������ ���������� ������, � ��, ��� ��� ���������, ����� �������� (��������, ���� ������� �� ������ ������ ��������).
����������� ����� ���� ���������, � ����� ��� �������������� �������������� �����������; � ����������, ��������� �� ������ ������� ������, ����� ���������� � ����� �������� ������. �� ���������, ��� ��� ������ ����� ��������������� ����������� ���������� �������� ������� ob_end_flush() ������� �� ���, ������� ���� ������� ob_start().
<?php function c($str) { // �������� ���������� ������ return nl2br($str); // ���������� ���������� ������ } function d($str) { // �������� ���������� ������ return strtoupper($str); // ���������� ���������� ������ } ?>
<?php ob_start("c"); ?> ��� ��������� �����... <?php // ��������������� ����� ���� � ������� ������� ob_start("d"); ?> ��� ���-��... <?php ob_end_flush(); ?> ....... <?php ob_end_flush(); ?>
ob_get_contents
��������� ����������� ������ ������.
��������� :
string ob_get_contents()
���� ����������� ���������, ������������ false.
��������� ����������� ������ ������.
��������� :
string ob_get_contents()
���� ����������� ���������, ������������ false.
ob_get_length
��������� ����� ������ � ������ ������.
��������� :
string ob_get_length()
���� ����������� ���������, ������������ false.
��������� ����� ������ � ������ ������.
��������� :
string ob_get_length()
���� ����������� ���������, ������������ false.
ob_end_flush
����� ����������� ������.
��������� :
void ob_end_flush(void)
����� ������ ����� �������� ������ ���������, ������� ��������� ������� ob_get_contents() �������, ���� ���������� �������� ��� ����������.
����� ����������� ������.
��������� :
void ob_end_flush(void)
����� ������ ����� �������� ������ ���������, ������� ��������� ������� ob_get_contents() �������, ���� ���������� �������� ��� ����������.
flush
����� ����� ����������� ������.
��������� :
void flush(void);
������� ������������ ������ �� ����������� PHP � �� ����� �������������� ����� ����������� web-������� ��� ��������.
��������� �������, � ����������� ��� Win32, ������������ ����������� ��������� ������ �� ����, ��� �������� ���������� � ������ ����� �������� ��������.
�������, � ���� �������, ����� ����� �������������� ���������� ������ �� �� �����������. Netscape, ��������, ������������ ����� �� ��������� ������� ���������� ������ ��� ������������ ����, � ��� ������ - �� ��������� ���� </table> ������� �������� ������.
����� ����� ����������� ������.
��������� :
void flush(void);
������� ������������ ������ �� ����������� PHP � �� ����� �������������� ����� ����������� web-������� ��� ��������.
��������� �������, � ����������� ��� Win32, ������������ ����������� ��������� ������ �� ����, ��� �������� ���������� � ������ ����� �������� ��������.
�������, � ���� �������, ����� ����� �������������� ���������� ������ �� �� �����������. Netscape, ��������, ������������ ����� �� ��������� ������� ���������� ������ ��� ������������ ����, � ��� ������ - �� ��������� ���� </table> ������� �������� ������.
ob_end_clean
������� ������.
��������� :
void ob_end_clean(void);
����� ������� ��������� ����������� �� ������� ������.
������� ������.
��������� :
void ob_end_clean(void);
����� ������� ��������� ����������� �� ������� ������.
ob_implicit_flush
������������ ������ �����������.
��������� :
void ob_implicit_flush([int flag]);
���� � ��������� ������� ��������� �������� ��� ��� �� �������, �� ��� ������������� ������ �������� ������ ����� ������ ��������� ������� flush().
���� ��������, ��� ����� ��� ������� �������� ��������; ��������, ���� � ����� �������� ������� ������� ob_end_clean(), �� �������� �� ������� ������, ���� ����� �� ������ �� ������������ ���� ������� ���������.
������������ ������ �����������.
��������� :
void ob_implicit_flush([int flag]);
���� � ��������� ������� ��������� �������� ��� ��� �� �������, �� ��� ������������� ������ �������� ������ ����� ������ ��������� ������� flush().
���� ��������, ��� ����� ��� ������� �������� ��������; ��������, ���� � ����� �������� ������� ������� ob_end_clean(), �� �������� �� ������� ������, ���� ����� �� ������ �� ������������ ���� ������� ���������.