PHP ob_implicit_flush() 함수
예시
출력을 생성하는 모든 명령문에 대해 즉시 콘텐츠를 브라우저로 보냅니다.
<?php
// Turn on implicit flushing
ob_implicit_flush(1);
// Some
browsers will not display the content if it is too short
// We use
str_pad() to make the output long enough
echo str_pad("Hello World!",
4096);
// Even though the script is still running, the browser already
can
see the content
sleep(3);
?>
정의 및 사용
이 ob_implicit_flush()
기능은 암시적 플러시를 활성화하거나 비활성화합니다. 활성화되면 암시적 플러시가 생성되는 즉시 출력을 브라우저로 직접 보내므로 flush()
함수 호출이 필요하지 않습니다.
통사론
ob_implicit_flush(flag);
매개변수 값
Parameter | Description |
---|---|
flag | When set to 1, implicit flushing is turned on. When set to 0, implicit flushing is turned off. |
기술적 세부 사항
PHP 버전: | 4+ |
---|
❮ PHP 출력 제어 기능