日期:2014-05-17 浏览次数:20712 次
function getContent($source){
if(empty($source)) return "";
$str = "这是我要返回的值了";
preg_match('/<span>(\d+)<\/span>/isU',$source,$matches);
if($matches[1]>time()){
return $str;
}else{
return "";
}
}
//使用方法
date_default_timezone_set("Asia/shanghai");
$content ='<span>1324570103</span>';
$res = getContent($content);