"PHP error reporting()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-== 참고 자료 == +==참고==))
(같은 사용자의 중간 판 하나는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;PHP error_reporting()
;PHP error_reporting()
*오류 보고 수준을 설정하는 PHP 함수
*오류 보고(reporting) 수준을 설정하는 PHP 함수


==예시==
==예시==
;오류 출력 끄기
{{소스헤더|오류 출력 끄기}}
<source lang='php'>
<source lang='php'>
error_reporting(0);
error_reporting(0);
</source>
</source>


;모든 오류 보기
{{소스헤더|모든 오류 보기}}
<source lang='php'>
<source lang='php'>
error_reporting(E_ALL);
error_reporting(E_ALL);
23번째 줄: 23번째 줄:
</source>
</source>


;[[E_NOTICE]]를 제외한 모든 오류 보기
{{소스헤더|[[E_NOTICE]]를 제외한 모든 오류 보기}}
<source lang='php'>
<source lang='php'>
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(E_ALL & ~E_NOTICE);
</source>
</source>


;[[E_ERROR]], [[E_WARNING]] 보기
{{소스헤더|[[E_ERROR]], [[E_WARNING]] 보기}}
<source lang='php'>
<source lang='php'>
error_reporting(E_ERROR | E_WARNING);
error_reporting(E_ERROR | E_WARNING);

2019년 7월 22일 (월) 23:05 판

1 개요

PHP error_reporting()
  • 오류 보고(reporting) 수준을 설정하는 PHP 함수

2 예시

오류 출력 끄기
error_reporting(0);
모든 오류 보기
error_reporting(E_ALL);
error_reporting(E_ALL);
error_reporting(-1);
ini_set('error_reporting', E_ALL);
E_NOTICE를 제외한 모든 오류 보기
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(E_ERROR | E_WARNING);

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}