[PHP] flush를 이용한 디버그 메세지 출력

2020. 4. 3. 11:54PHP

<?
function debug_log($msg) {
	ob_end_clean();
	echo $msg.'<br>';
	ob_flush();
	flush();
}

for($i=1;$i<=5;$i++) {
	debug_log('Hello World'.$i);
	sleep(1);
}
?>

 

'PHP' 카테고리의 다른 글

[PHP] 캔버스 이미지 업로드  (0) 2020.06.23
[PHP] 메모리 무제한 설정  (0) 2020.04.03
[PHP] base64 데이터를 이미지로 저장하기  (0) 2020.03.20
[PHP] 유튜브 API  (0) 2020.03.20
[PHP] 공휴일 API  (0) 2020.03.20