Warning: file_put_contents(): Only -1 of 52 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
ob_get_contents ob_get_length 출력 제어 PHP Manual ob_get_flush (PHP 4 >= 4.3.0, 5) — Flush the output buffer, return it as a string and turn off buffering 설명 ( void ) ob_get_flush() f...
Forum und email

ob_get_flush

(PHP 4 >= 4.3.0, PHP 5)

ob_get_flush — Flush the output buffer, return it as a string and turn off output buffering

설명

string ob_get_flush ( void )

ob_get_flush() flushes the output buffer, return it as a string and turns off output buffering.

Note: This function is similar to ob_end_flush(), except that this function returns the buffer as a string.

반환값

Returns the output buffer or FALSE if no buffering is active.

예제

Example#1 ob_get_flush() example

<?php
//using output_buffering=On
print_r(ob_list_handlers());

//save buffer in a file
$buffer ob_get_flush();
file_put_contents('buffer.txt'$buffer);

print_r(ob_list_handlers());
?>

위 예제의 출력:

Array
(
    [0] => default output handler
)
Array
(
)