赵小黑 发表于 2018-12-16 06:41:55

PHP 简单日历编写

/*
* PHP日历核心程序编写
*
*/
    $year= isset($_GET['year'])?$_GET['year']:date('Y');
    $month = isset($_GET['month'])?$_GET['month']:date('m');
    $day = isset($_GET['day'])?$_GET['day']:date('d');
    //当年当月的天数
    $days = date("t",mktime(0,0,0,$month,1,$year));
    //当月的第一天是星期几
    $startweek = date("w",mktime(0,0,0,$month,1,$year));
   
    echo '';
    echo '';
    echo '日';
    echo '一';
    echo '二';
    echo '三';
    echo '四';
    echo '五';
    echo '六';   
    echo '';
    echo '';
    for($i=0;$i
页: [1]
查看完整版本: PHP 简单日历编写