XML to JSON (NOCDATA) $List = simplexml_load_string($List, NULL, LIBXML_NOCDATA); $json = json_encode($List); $array = json_decode($json, true); 형식의 XML에서 CDATA 내용을 제거 후 JSON으로 변환하는 방법 Backend/PHP 2020. 9. 21. 15:22
[Apache] SSL Certification -> OpenSSL 로 바꾸기 기본적으로 SSL 인증서를 추가하게되면 아파치를 가동 시 비밀번호를 요구한다. [root]# /usr/local/httpd/bin/apachectl start Apache/2.2.34 mod_ssl/2.2.34 (Pass Phrase Dialog) Some of your private key files are encrypted for security reasons. In order to read them you have to provide the pass phrases. Server www.test.or.kr:443 (RSA) Enter pass phrase: OK: Pass Phrase Dialog successful [root]# 위와 같이 서버를 가동 시 항상 비밀번호를 요구하기 때문에 재가동 시 .. Server/Linux 2020. 9. 11. 09:29
properties && @Value 사용하기 servlet.xml 에서 등록 properties 파일에 다음과 같이 있다고 가정 db.username=test class 파일에서는 다음과 같이 사용 @Value("${db.username}") private String username; Backend/Java 2020. 9. 4. 10:53
MYSQL PASSWORD와 비밀번호 비교 mysql password 는 단순 sha1 암호화를 2번 거쳐 앞에 * 를 추가한것과 같다 function mysql_password($in) { $p = sha1($in,true); $p = sha1($p); return "*".strtoupper($p); } SELECT PASSWORD('1234') *A4B6157319038724E3560894F7F932C8886EBFCF echo(mysql_password("1234")); 결과 : *A4B6157319038724E3560894F7F932C8886EBFCF 비교식을 통해 비밀번호 일치를 체크하면 된다 if(DB에서 조회한 패스워드 != mysql_password($password)) { echo("비밀번호가 틀립니다."); } Backend/PHP 2020. 9. 2. 10:54