Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- AC1300
- DS718+
- replace
- javascript
- utf-8
- ajax
- 크로스 컴파일
- Injection
- readonly
- FileSystemObject
- XMLHTTP
- jquery 레이어
- 따라다니는 배너
- form
- println
- PHP GCM
- lsusb
- submit
- ASP
- SQL Injection
- 커널
- euc-kr
- Getrows
- synology
- 무선랜카드
- RTL88x2BU
- disabled
- include
- jQuery
- 시놀로지
Archives
- Today
- Total
아는 것이 좋은 것이다.
[PHP] date 함수 사용 설정 본문
$year = date("Y");
위와 같이 사용시 아래의 에러를 보는 경우가 있다. (PHP 신규 설치 및 설정 문제)
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.
이와 같은 에러의 원인은 timezone 설정이 안되어 있기 때문이다.
* php 소스상에서 선언
date_default_timezone_set('Asia/Seoul'); //서울기준
* php.ini 설정
date.timezone = Asia/Seoul
php ini의 경우 웹서버를 재시작 해주어야 제대로 적용 된다.
'PHP' 카테고리의 다른 글
[PHP] 자바 class 호출 (0) | 2016.02.26 |
---|---|
[PHP] 인코딩 관련 깨짐 (0) | 2015.03.26 |
[PHP] 배열에 값 추가 (0) | 2015.03.17 |
[PHP] 페이지내의 모든 변수를 표시 (0) | 2015.03.16 |
[PHP] 코드이그나이터 index.php 삭제하기 (0) | 2015.02.13 |
Comments