设为首页 加入收藏

TOP

dede 采集到数据后,发布日期变为本地日期解决方法
2019-08-23 00:32:47 】 浏览:17
Tags:dede 采集 数据 发布 日期 变为 本地 解决 方法

找到dede目录下的co_export.php

大概在170行左右

 1  //获取时间和标题
 2         $pubdate = $sortrank = time();
 3         $title = $row->title;
 4         $litpic = '';
 5         foreach ($dtp->CTags as $ctag)
 6         {
 7             $itemName = $ctag->GetAtt('name');
 8             if($itemName == 'title' && $usetitle==0)
 9             {
10                 $title = trim($ctag->GetInnerText());
11                 if($title=='')
12                 {
13                     $title = $row->title;
14                 }
15             }
16             else if($itemName == 'pubdate')
17             {
18                 $pubdate = trim($ctag->GetInnerText());
19                 if(preg_match("#[^0-9]#", $pubdate))
20                 {
21                     $pubdate = $sortrank = GetMkTime($pubdate);
22                 }
23                //  else  //将注释部分删掉即可,共4行
24                //  {
25                //      $pubdate = $sortrank = time();
26                //  }
27             }
28             else if($itemName == 'litpic')
29             {
30                 $litpic = trim($ctag->GetInnerText());
31             }
32         }

 

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇php单例模式 下一篇[PHP]算法-最长公共子串的PHP实现

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目