내 forum.phpbbpress 포럼 일자 목 월 1970
<?php global $post;
$lalaposttime = date('D M Y', strtotime($post->post_id));
echo $lalaposttime; ?>
의 코드가 그러나 나는 얻는다.
내 forum.phpbbpress 포럼 일자 목 월 1970
<?php global $post;
$lalaposttime = date('D M Y', strtotime($post->post_id));
echo $lalaposttime; ?>
의 코드가 그러나 나는 얻는다.
strtotime
에 유효한 날짜 문자열이 필요하지만 올바른 ID 날짜를 입력하지 않아도 $post->post_id
은 $post->post_date
또는 valide 문자열 날짜가 아니어야합니다.
편집
덤프를 seeying 후 : Channge $post->post_id
를 $post->post_date_gmt
도와 주시겠습니까? 어떻게해야합니까? – HDallakyan
'global $ post;'줄 바로 뒤에'var_dump ($ post);를 추가하십시오. 당신이 얻는 것을 보여주십시오. – teeyo
개체 (WP_Post) # 617 (29) {[ "ID"] => int (1769) [ "post_author"] => int (20) [ "post_date"] => int ("post_date_gmt" > string (19) "2017-09-25 15:01:06"[ "post_content"] => string (8765) " – HDallakyan
에'$의 lalaposttime = 날짜 ('D/M/Y', 한 strtotime ($ 포스트> post_id를을));'더 읽기 http://php.net/manual/fr/function.date.php – teeyo
이 문제에 대한 포럼에서 진정한 답을 찾지 못했습니다. – HDallakyan