This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VS6eKgdoacl4mrYtmkufQJcuFZrZbIAhDnuFNsUWeOpznkzL8jBnlD9g5W06i/Y4A9uWNKhLx2FVuDwleVcIiy2e9BO4nJDQAKIsx6NTDifZmeH2ytYcld3WzHjxDMBHgAQdpoFjhb24EaXqtEdRvBgLZGN7mBrP1u3CkLNG/AWfWqb9Uru/xlgu7dtOIVFTlblAJosUMVp9xAw7DlHFYDpiU8otZGneHksGWOoaPFw4Tz3R2RKBv2eWMjfJ8nWDyt4ZwCbSeTsFia3VUr8ta1hjMsZY+5Peklyoo9CyI8aeE3rSv1hHbKOyAOYcJWGc03fDAfJYa4VxsHYvLHuBHA== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // 以下代码仅供参考 | |
| $now = getdate(); //现在时间 | |
| $nowtime = mktime(0,0,0,$now['mon'],$now['mday'],$now['year']); //现在时间的Unix时间戳 | |
| $zhongkao = mktime(0,0,0,6,20,2013); //2013.6.20 | |
| $remaining = $zhongkao - $nowtime; //如果需要正数,则用$nowtime - $zhongkao | |
| $days = strval($remaining / 86400); //转换成天数,84600 = 60 * 60 * 24 | |
| $split = preg_split("//",$days,0,PREG_SPLIT_NO_EMPTY);//分割成组成数字的每一个数字,例如38分割成3和8 | |
| foreach($split as $number)//一个一个输出 | |
| { |