在织梦/include/extend.func.php 文件 添加以下代码

//获取当前栏目的url时间
function remote_filectime($url_file){   
$headInf = get_headers($url_file,1);   
$time= strtotime($headInf['Last-Modified']);  
$timea = date('Y-m-d',$time).'T'.date('H:i:s',$time);
return $timea;
}

织梦获取栏目和首页的时间的函数

织梦调用方法

{dede:global.cfg_indexurl function='remote_filectime(@me)'/} //首页获取url时间

{dede:type}[field:typelink function='remote_filectime(@me)'/]{/dede:type}//栏目页获取url时间

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。