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

西湖的风景是那样的雄伟壮观;湖水是那样清澈;是那样的平静,像一面镜子;湖边的景色是那样的美不胜收。

在织梦/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时间

以上就是织梦获取栏目和首页的时间的函数。作为一个领导,你可以不知道下属的短处,却不能不知道下属的长处。更多关于织梦获取栏目和首页的时间的函数请关注haodaima.com其它相关文章!