본문 바로가기
반응형

프로그램524

[PHP] switch 사용법 ▶ php switch 사용법 ◆ 설명 switch 명령문은 다른 조건에 따라 다른 작업을 수행하는 데 사용 ◆ 사용 예제 1 소스 결과 i is bar ◆ 사용 예제 2 소스 결과 i is not equal to 0, 1 or 2 2022. 2. 16.
[PHP] 현재 서버 시간 ▶ php 현재 서버 시간 알기(date) data - 시간/날짜 형식 지정 ◆ 사용 예제 1 소스 결과 현재날짜 : 2022/02/10 현재날짜 : 2022.02.10 현재날짜 : 2022-02-10 현재요일 : Thursday 현재시간 : 07:51:23 현재시간 : 07:51:23am 내일 : 2022-02-11 12:00:00am 3달후 : 2022-05-10 07:51:23am 2022. 2. 14.
[PHP]try,catch,finally ▶ php try,catch,finally 사용법 ◆ 설명 예외처리 ◆ 사용방법 1. 인덱스 배열이 있는 있는 경우 try { // } catch { // } finally { // } ◆ 사용 예제 1 (예제는 php.net에서 가져옴) 소스 결과 0.2 First finally. Caught exception: Division by zero. Second finally. Hello World ◆ 사용 예제 2 (예제는 php.net에서 가져옴) 소스 결과 string(4) "foo!" 2022. 2. 11.
[php]print_r() 함수 사용법 ▶ php print_r() 함수 사용법 ◆ 설명 print_r() 함수는 사람이 읽을 수 있는 방식으로 변수에 대한 정보를 인쇄합니다. ◆ 사용방법 print_r(variable, return); ◆ 사용 예제 1 소스 결과 Array ( [0] => doctor [1] => lawyer [2] => driver ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) ◆ 사용 예제 2 소스 결과 Array ( [a] => apple [b] => banana [c] => Array ( [0] => x [1] => y [2] => z ) ) 2022. 2. 9.
[php]trim() 함수 사용법 ▶ php trim() 함수 사용법 ◆ 설명 trim() 함수는 문자열 양쪽 공백 및 정의된 문자를 제거 합니다. ltrim() 함수는 문자열 왼쪽에서 공백 및 정의된 문자를 제거 합니다. rtrim() 함수는 문자열 오른쪽에서 공백 및 정의된 문자를 제거 합니다. ◆ 사용 예제 1 소스 결과 wellcome to my home llcome to my hom ◆ 사용 예제 2 소스 결과 함수사용 안함: /사과/배/토마토/수박/ trim함수 사용: 사과/배/토마토/수박 ltrim함수 사용: 사과/배/토마토/수박/ rtrim함수 사용: /사과/배/토마토/수박 2022. 2. 7.
[PHP] setcookie 사용법 ▶ php setcookie 사용법 ◆ 설명 쿠키는 사용자를 식별하는 데 사용 ◆ 사용방법 1. 쿠키 만들기 setcookie(name, value, expire, path, domain, secure, httponly); 2. 쿠키 옵션 설명 string $name 설정 쿠키 이름 string $value 쿠키 이름에 들어갈 값 int $expires 만료시간 $expires설정되지 않거나 0으로 설정되면 웹 브라우저가 닫힐 때 쿠키가 만료됩니다. string $path 쿠키를 사용할 수 있는 경로 지정, '/'사용시 전체 경로에서 사용 가능 string $domain 쿠키를 사용할 수 있는 도메인 bool $secure 설정값이 true 이면 보안 프로토콜 https에서만 사용 가능 bool $htt.. 2022. 2. 5.
[php] foreach 사용법 ▶ php foreach 사용법 ◆ 설명 배열의 모든 요소를 반복 처리 ◆ 사용방법 1. 인덱스 배열이 있는 있는 경우 foreach ($array_name as $element) { // process element here } 2. 연관 배열이 있는 있는 경우 결과 사과 배 딸기 수박 ◆ 사용 예제 2 소스 결과 국어 = 95 숙학 = 90 영어 = 85 2022. 2. 5.
php 구문 PHP 문서 작성은 로 끝난다. 예제 PHP 구문 결과 2022. 2. 4.
css 플렉스(flex) 속성 플렉스(flex) 속성 html 소스 CSS 플렉스(flex) 속성 - flex:auto Section01 Section02 Section02 Section03 Section03 Section03 css 소스 body { background-color: #2596be; } .layer-wrap { position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; width: 400px; height: 400px; } h3 { padding-top: 20px; text-align: center; color:#ffffff; } .box { display: flex; width: 400px; height: 300px; border: 1px soli.. 2022. 1. 25.
jQuery parents() Method jQuery parents() Method The parents() method returns all ancestor elements of the selected element, all the way up to the document's root element (). [이 parents()메서드는 문서의 루트 요소( ) 까지 선택한 요소의 모든 상위 요소를 반환합니다 .] html parents parents css ul { padding:0; margin:0; list-style:none; } li { height:40px; line-height:40px; text-align:center; border:1px solid #ddd; border-top:0; } li:first-child { border-.. 2022. 1. 12.
jQuery hover() Method The hover() method specifies two functions to run when the mouse pointer hovers over the selected elements. This method triggers both the mouseenter and mouseleave events. (hover() 메서드는 마우스 포인터가 선택한 요소 위에 있을 때 실행할 두 가지 함수를 지정합니다. 이 메서드는 mouseenter 및 mouseleave 이벤트를 모두 트리거 합니다.) html jQuery hover() Methodt jQuery hover() Methodt jQuery hover() Methodt jQuery hover() Methodt jQuery hover() Methodt.. 2022. 1. 8.
Pure CSS Animated custom radio buttons - 라디오 버튼 html / css demo and code ▼ Pure CSS Animated custom radio buttons Example Pure CSS Animated custom radio buttons snippet for your project 📌📌. this snippet is created using HTML, CSS, Pure CSS, Javascript bbbootstrap.com 2022. 1. 5.