PHP 数据库操作

2019-04-15 13:36发布

$url = home_url()."/wp-content/themes/twentythirteen/pic/".$result['pic']; $headers = @get_headers($url); if(strpos($headers[0],'404') ) { $url=home_url()."/wp-content/themes/twentythirteen/pic/default.png"; } $content=$result['detail']."
"; $detail = preg_replace('//', '', $content); date_default_timezone_set('PRC'); // 中国时区 $time=date('Y-m-d H:i:s',$result['time']); echo "
  • ".$result['title']." 时间:".$time."
    概要:".mb_substr($detail,0,60,'utf-8')."……
  • "; }?>