개발자료/Web(18)
-
[Javascript] UIWebView, WKWebView 구분
# isUIWebView true 이면 UIWebView, false 이면 WKWebView function isUIWebView(){ var isInApp = navigator.userAgent.match(/ipod|iphone|ipad/i) && navigator.userAgent.indexOf('Safari') === -1, isUIWebView = false; if(isInApp){ try { isUIWebView = window.webkit.messageHandlers===undefined?true:false; } catch(err) { isUIWebView = true; } } return isUIWebView; }
2020.11.04 -
[PHP] .htaccess error_reporting
2020/07/16 - [개발/Web] - [PHP] .htaccess short_open_tag 설정 [PHP] .htaccess short_open_tag 설정 # short_open_tag=On|Off php_value short_open_tag 0 php_value short_open_tag 1 wonyoung2.tistory.com # error_reporting 설정 php_value error_reporting 22519 E_ALL & ~E_STRICT & ~E_NOTICE & ~E_DEPRECATED E_ALL(32767) – E_STRICT(2048) – E_NOTICE(8) – E_DEPRECATED(8192) = 22519 # 에러 레벨 상수값 Error Level Constants ..
2020.07.20 -
[PHP] .htaccess short_open_tag 설정
# short_open_tag=On|Off php_value short_open_tag 0 php_value short_open_tag 1 PHP 개발시 Short Tag() 사용할때 사용
2020.07.16 -
[PHP] SQLite3 Escape String
# PHP 5 = 1.0.0 // 사용법 // sqlite_escape_string ( string $item ) : string echo sqlite_escape_string('Hello "World" \'\' ...'); // output // Hello "World" '''' ... # (PHP 5 >= 5.3.0, PHP 7) // Description // public static SQLite3::escapeString ( string $value ) : string echo SQLite3::escapeString('Hello "World" \'\' ...'); // output // Hello "World" '''' ... SQLite3에 사용될 쿼리문을..
2020.07.15 -
[PHP] Base64 Image 파일로 변경하기
# 소스 $data = 'data:image/png;base64,iVBOR...'; list($type, $data) = explode(';', $data); list(, $data) = explode(',', $data); $data = base64_decode($data); file_put_contents('image.png', $data); 이미지 형태에 맞게 확장자 정의 해주면 된다.
2020.07.14 -
[PHP] 랜덤 암호화 키, 랜덤 IV 생성
○ 16진수 형태의 암호화 키를 랜덤하게 생성하는 함수 function getRandomHexLoop($iSize=64) { $arrHex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); $strHex = ''; for($i=0; $i
2020.07.10