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

 
(사용자 2명의 중간 판 3개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{DISPLAYTITLE:PHP error_reporting()}}
==개요==
==개요==
;PHP error_reporting()
;PHP error_reporting()
5번째 줄: 6번째 줄:
==예시==
==예시==
{{소스헤더|오류 출력 끄기}}
{{소스헤더|오류 출력 끄기}}
<source lang='php'>
<syntaxhighlight lang='php'>
error_reporting(0);
error_reporting(0);
</source>
</syntaxhighlight>


{{소스헤더|모든 오류 보기}}
{{소스헤더|모든 오류 보기}}
<source lang='php'>
<syntaxhighlight lang='php'>
error_reporting(E_ALL);
error_reporting(E_ALL);
</source>
</syntaxhighlight>
<source lang='php'>
<syntaxhighlight lang='php'>
error_reporting(E_ALL);
</source>
<source lang='php'>
error_reporting(-1);
error_reporting(-1);
</source>
</syntaxhighlight>
<source lang='php'>
<syntaxhighlight lang='php'>
ini_set('error_reporting', E_ALL);
ini_set('error_reporting', E_ALL);
</source>
</syntaxhighlight>


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


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


==같이 보기==
==같이 보기==
42번째 줄: 40번째 줄:
*http://php.net/manual/en/errorfunc.configuration.php#ini.error-reporting
*http://php.net/manual/en/errorfunc.configuration.php#ini.error-reporting


[[분류: PHP 오류]]
[[분류: PHP 오류 처리 함수]]

2022년 12월 22일 (목) 15:15 기준 최신판

1 개요[ | ]

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

2 예시[ | ]

오류 출력 끄기
error_reporting(0);
모든 오류 보기
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 }}