본문 바로가기

프로그래밍83

여러가지 UTF BOM if ( (bom[0] == (byte)0xEF) && (bom[1] == (byte)0xBB) && (bom[2] == (byte)0xBF) ) { encoding = "UTF-8"; unread = n - 3; } else if ( (bom[0] == (byte)0xFE) && (bom[1] == (byte)0xFF) ) { encoding = "UTF-16BE"; unread = n - 2; } else if ( (bom[0] == (byte)0xFF) && (bom[1] == (byte)0xFE) ) { encoding = "UTF-16LE"; unread = n - 2; } else if ( (bom[0] == (byte)0x00) && (bom[1] == (byte)0x00) && (bom[2.. 2008. 9. 4.
MySQL에서 지원하는 데이터 타입 MySQL에서 지원하는 데이터 타입 데이터 타입 설명 및 범위 tinyint 부호 있는 정수 -128 ∼ 127 부호 없는 정수 0 ∼ 255 1 Byte smallint 부호 있는 정수 -32768 ∼ 32767 부호 없는 정수 0 ∼ 65535 2 Byte mediumint 부호 있는 정수 -8388608 ∼ 8388607 부호 없는 정수 0 ∼ 16777215 3 Byte int OR integer 부호 있는 정수 -2147483648 ∼ 2147483647 부호 없는 정수 0 ∼ 4294967295 4 Byte bigint 부호 있는 정수 -9223372036854775808 ∼ -9223372036854775807 부호 없는 정수 0 ∼ 18446744073709551615 8 Byte floa.. 2008. 8. 25.
[PHP] 변수에 함수를 넣어서 실행하기 function do_something(){  echo "done\n";}function something_else(){  echo "we did something else\n";}function test_dynamic_functions() {  $which_function = do_something;  $which_function();  $which_function = something_else;  $which_function();}test_dynamic_functions();?> 2008. 8. 24.
[PHP] set_error_handler — Sets a user-defined error handler function Description mixed set_error_handler ( callback $error_handler [, int $error_types ] ) Sets a user function (error_handler ) to handle errors in a script. This function can be used for defining your own way of handling errors during runtime, for example in applications in which you need to do cleanup of data/files when a critical error happens, or when you need to trigger an error under certain c.. 2008. 8. 23.