php

웹이야기

[PHP] 날짜 함수 strtotime()

[PHP] 날짜 함수 strtotime() strtotime() 사용법- 하루전, 일주일전, 한달전, 1년전 날짜는 뭘까요??- 반대로 하루후도 알아볼까요??- 기준( 2012-07-25 )date("Y-m-d H:i:s",strtotime("-1 day", time())); - 결과 "2012-07-24" ( 하루전 )date("Y-m-d H:i:s",strtotime("+1 day", time())); - 결과 "2012-07-26" ( 내일 ) day, week, month, next monday, last monday,year 여러가지로 테스트 해보세요~ php.net - http://kr.php.net/manual/kr/function.strtotime.php

웹이야기

[PHP] 문자열에서 HTML과 PHP 태그를 제거

[PHP] 문자열에서 HTML과 PHP 태그를 제거 strip_tagsstrip_tags - 문자열에서 HTML과 PHP 태그를 제거string strip_tags ( string $str [, string $allowable_tags ] ) 예제)

웹이야기

[PHP] Header, GET, POST

[PHP] Header, GET, POST headerphp에 헤더를 설정하지 않고 그냥 작업을 하면 이런 경우가 발생합니다. 위와 같이 작성하고 실행을 한 화면입니다. IE 와 불여우 입니다. 불여우는 그냥 제대로 나오는 군요.헤더를 안 설정해 줘서 그렇습니다. 간혹 UTF-8로 페이지를 인코딩하고 HTML은 설정을 해줬으나 php는 설정하지 않은 경우한글을 폼에서 입력받아서 그 값으로 php에서 DB검색을 하는데 값이 안 나옵니다. 대략난감....header("content-type:text/html;charset:utf-8");그럼 IE 에서도 잘 나옵니다.요렇게 나오는 군요. header 함수는 http를 전송하는 것이며, // 문서형태와 문자셋header("Content-Type:text/htm..

웹이야기

[PHP] 문자 대,소문자 변환

소문자 변환strtolower() 대문자 변환strtoupper() 첫 글자만 대문자ucfirst() 각 단어의 첫 글자만 대문자ucwords()

아이탱
'php' 태그의 글 목록