sns 식 종료날짜 표기방법 정보
sns 식 종료날짜 표기방법
본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
$timestamp = strtotime($vote[vt_edate]); // 글쓴날짜시간 Unix timestamp 형식
if ($timestamp >= $time_ymdhis + 86400 * 1) {
$str = (int)(($time_ymdhis + $timestamp) / 86400) . "일후";
}else if ($timestamp >= $time_ymdhis + 3600 * 1) {
$str = (int)(($time_ymdhis + $timestamp) / 3600) . "오늘";
}else {
$str = "-";
}
$dateday = $str;
이렇게 해봤는데 16069일후 이렇게 표기되네요
종료날짜가 13.12.31 (화) 00시 까지인경우
남은 기간 31일까지는 "xx일후"
당일인경우는 "오늘"
그외에는 "-"
이렇게 표기되게 하고 싶습니다.
오류 주소 :
$timestamp = strtotime($vote[vt_edate]); // 글쓴날짜시간 Unix timestamp 형식
if ($timestamp >= $time_ymdhis + 86400 * 1) {
$str = (int)(($time_ymdhis + $timestamp) / 86400) . "일후";
}else if ($timestamp >= $time_ymdhis + 3600 * 1) {
$str = (int)(($time_ymdhis + $timestamp) / 3600) . "오늘";
}else {
$str = "-";
}
$dateday = $str;
이렇게 해봤는데 16069일후 이렇게 표기되네요
종료날짜가 13.12.31 (화) 00시 까지인경우
남은 기간 31일까지는 "xx일후"
당일인경우는 "오늘"
그외에는 "-"
이렇게 표기되게 하고 싶습니다.
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339