$firstday = date('w',strtotime($year.'-'.$month.'-1'));
$week = date('w',strtotime($year.'-'.$month.'-'.$day));
我只想知道 这个date 和strtotime 代表什么意思

解决方案 »

  1.   

    date w 是 星期几的意思。 strtotime 返回这个日期的 时间戳 .
    总的说 就是 分析 strtotime(日期) 是星期几 
      

  2.   

    据php手册说 date具有如此这般的作用,strtotime 具有某某的作用
      

  3.   

    将日期时间转换成时间戳格式,再从时间戳内取得星期几date 和strtotimestrtotime本函数预期接受一个包含美国英语日期格式的字符串并尝试将其解析为 Unix 时间戳(自 January 1 1970 00:00:00 GMT 起的秒数),其值相对于 now 参数给出的时间,如果没有提供此参数则用系统当前时间。 date返回将整数 timestamp 按照给定的格式字串而产生的字符串。如果没有给出时间戳则使用本地当前时间。换句话说,timestamp 是可选的,默认值为 time()。w  星期中的第几天,数字表示
      

  4.   

    $year=2012
    $month4=4
     $firstday和
    $week 是多少啊
    我不会算啊
      

  5.   

    date('w',strtotime(2012-4-28));
    这个等于多少?
    date('w',strtotime(2012-4-1));
    这个又是多少?
      

  6.   


    echo date('w',strtotime(2012-4-28));
    //这个等于多少?
    echo date('w',strtotime(2012-4-1));
    //这个又是多少?就有结果了
      

  7.   


    api中一般都有详细的算法介绍,LZ自己去看看,这里来解答你问题的,不是仅仅看中你的分数,是为了帮你解决问题,别拿分数来压人