4,518,648 th visitor since 2017.2.1 ( Today : 9215 )
Programming
No. 773
Name. swindler
Subject. phpinfo local, master 차이 error_reporting 32767 22527 의미
Main Cate. PHP
Sub Cate.
Date. 2016-11-14 16:43
Hit. 3855 (121.78.49.66)
File.
phpinfo(); 로 출력해보면,
해당 값들이 Local Value와 Master Value 2개로 나뉘어져 있는 것을 알 수 있다.

Master Value는 사이트 전체에서 지정된 옵션이고,
Local Value는 디렉토리별로 설정된 값이다.

보통 Local Value 설정이 다른 것은 별도로 지정했기 때문이다.
예를 들어서 CodeIgniter Framework 에서 index.php안에 다음과 같은 설정이 있을 수 있다.

error_reporting(E_ALL);


사이트별로 지정하는 것은 apache virtual host에서 설정이 가능하다.

<VirtualHost ..>

php_flag xxxxx on

</VirtualHost>




error_reporting 값에 대해서 대략 아래와 같은 값을 가진다.

32767 E_ALL
16384 E_USER_DEPRECATED
4096 E_RECOVERABLE_ERROR

그래서 22527인 경우에는 다음과 같다.
E_ALL & ~E_DEPRECATED & ~E_STRICT



<?php
$error_number = 22527;
$error_description = array( );
$error_codes = array(
E_ERROR => "E_ERROR",
E_WARNING => "E_WARNING",
E_PARSE => "E_PARSE",
E_NOTICE => "E_NOTICE",
E_CORE_ERROR => "E_CORE_ERROR",
E_CORE_WARNING => "E_CORE_WARNING",
E_COMPILE_ERROR => "E_COMPILE_ERROR",
E_COMPILE_WARNING => "E_COMPILE_WARNING",
E_USER_ERROR => "E_USER_ERROR",
E_USER_WARNING => "E_USER_WARNING",
E_USER_NOTICE => "E_USER_NOTICE",
E_STRICT => "E_STRICT",
E_RECOVERABLE_ERROR => "E_RECOVERABLE_ERROR",
E_DEPRECATED => "E_DEPRECATED",
E_USER_DEPRECATED => "E_USER_DEPRECATED",
E_ALL => "E_ALL"
);
foreach( $error_codes as $number => $description )
{
if ( ( $number & $error_number ) == $number )
{
$error_description[ ] = $description;
}
}
echo sprintf(
"error number %d corresponds to:\n%s",
$error_number,
implode( " | ", $error_description )
);
?>



error number 22527 corresponds to:
E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR | E_USER_DEPRECATED





[바로가기 링크] : http://coolx.net/cboard/develop/773



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog