我正在尝试创建此提要未验证的RSS提要。从…
<pubDate><?php echo $topNewest->data['last_update'] ?></pubDate>echo <pubDate>2012-10-02 13:00:00</pubDate>
我希望替换元素必须是RFC-822日期时间
<pubDate>Wed, 02 Oct 2002 13:00:00 GMT</pubDate>发布于 2014-03-26 16:29:22
在内置了RFC822的php中使用DateTime类
$d = new DateTime($topNewest->data['last_update']);
echo $d->format(DateTime::RFC822);如果需要,您可以更改格式,请查看php.net/date
https://stackoverflow.com/questions/22655070
复制相似问题