
PHP에서 output_buffering을 활성화한 후 오류 메시지를 출력하려면, error_reporting() 함수를 사용하여 오류를 출력할 수 있습니다.
#hostingforum.kr
php
ini_set('output_buffering', 1);
error_reporting(E_ALL);
또한, display_errors() 함수를 사용하여 오류 메시지를 화면에 출력할 수 있습니다.
#hostingforum.kr
php
ini_set('display_errors', 1);
하지만, production 환경에서는 오류 메시지를 화면에 출력하지 않도록 하기 위해, display_errors() 함수를 사용하여 오류 메시지를 로그 파일에 출력하는 방법을 추천합니다.
#hostingforum.kr
php
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', 'error.log');
이러한 방법을 통해, PHP에서 output_buffering을 활성화한 후 오류 메시지를 출력할 수 있습니다.
2025-07-18 10:05