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

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
6번째 줄: 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);
error_reporting(E_ALL);
</source>
</syntaxhighlight>
<source lang='php'>
<syntaxhighlight 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>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 02:57 판

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 }}