php基础 php 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?phpdate_default_timezone_set('Asia/Shanghai');$timestamp = strtotime('2014 + 10 week -20 week');echo '2014年第10周减20周的结果是:'.date('Y年W周',$timestamp);echo ',timestamp是'.$timestamp;?> date_default_timezone_set('Asia/Shanghai');$day = "201405";function getDay($day,$pre){ $year = substr($day, 0,4); $week = substr($day, 4,2); $curYear = $year."-01-01"; $xcDays = ($week + $pre)*7;//*7相差多少天 相差周数乘以7 echo date('Y-m-d',strtotime("$curYear $xcDays day")).'<br>';//}getDay($day,'-6'); 如何实现“当名字在数据库中不存在时,转到错误页面。”? 关于下面这个递归,为什么最后的$a值为0?不是1吗? phpMyAdmin -错误 php处理字符串 使用json_encode获取中文unicode的问题 php 下在word文档中文文件名如何处理 >>> xajax中这段代码是什么意思??? 关于PHP如何连接SYBASE 为什么cookie删除不了阿!!%%5555555~~~~~~~~ PHP能否检查是否有任何输出? 求求正则!!!!大神救救我。。。。 求大神帮忙,CI访问restful问题
date_default_timezone_set('Asia/Shanghai');$timestamp = strtotime('2014 + 10 week -20 week');
echo '2014年第10周减20周的结果是:'.date('Y年W周',$timestamp);
echo ',timestamp是'.$timestamp;
?>
$day = "201405";function getDay($day,$pre){
$year = substr($day, 0,4);
$week = substr($day, 4,2);
$curYear = $year."-01-01";
$xcDays = ($week + $pre)*7;//*7相差多少天 相差周数乘以7
echo date('Y-m-d',strtotime("$curYear $xcDays day")).'<br>';//
}
getDay($day,'-6');