C

PHP 스크립트에서 에러메시지 제어하기 옵션

· 2013-10-17 (목) 19:40:50 · 2131
PHP 스크립트상에서 에러메시지를 제어할 수 있는데 여러가지 옵션이 있습니다.
옵션을 참고하셔서 디버깅할때 활용하시기 바랍니다.
옵션을 바꾸면서 테스트를 해보시기 바랍니다.

출처 : http://php.net/manual/en/function.error-reporting.php

<?php

// Turn off all error reporting , 모든 에러메시지 표시하기 않기
error_reporting(0);

// Report simple running errors, 실행에러만 간단히 표시
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

// Report all PHP errors (see changelog)
error_reporting(E_ALL);

// Report all PHP errors
error_reporting(-1);

// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);

?>
|
댓글을 작성하시려면 로그인이 필요합니다.

팁게시판

6,077건

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
14-04-30 조회 4,427
14-04-27 조회 1,834
14-04-26 조회 2,047
14-04-13 조회 2,116
14-04-13 조회 1,334
14-03-25 조회 3,810
14-03-25 조회 1,497
14-03-12 조회 1,403
14-03-12 조회 2,868
14-02-24 조회 2,244
13-12-27 조회 1,978
13-11-18 조회 1,917
13-11-18 조회 4,248
13-10-17 조회 2,132
13-10-03 조회 3,831
13-10-02 조회 1,542
13-09-29 조회 2,127
13-09-29 조회 1,527
13-09-17 조회 1,355
13-09-11 조회 3,536
13-09-09 조회 1,814
13-09-05 조회 6,722
13-08-23 조회 3,176
13-08-22 조회 2,714
13-08-22 조회 2,047