Blogger Information
Blog 62
fans 3
comment 1
visits 29670
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
dede获取栏目和首页的时间的函数
kiraseo_wwwkiraercom
Original
1110 people have browsed it

操作方法(在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时间

温馨提醒

请认真看教程操作。否则不能掌握

温馨提醒,如果使用自定义函数话一定要写在(extend.func.php)文件中

文件所属位置:域名/include/extend.func.php 文件里面即可

书写的简单查看,是否有相同函数名字,如有,记得修改(同时修改的时候,调用自己修改后的函数名)

本文章为作者原创,没有作者授权,请勿转载!!!




Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post