<?php
include("head.php");
include("conn.php");
include_once("function.php");
$sid=sqlstr($_COOKIE['dl']);
$user=mysql_fetch_array(mysql_query("select * from user where sid='$sid'"));
$id=$user['id'];

$rs=mysql_query('select * from `diary` where diarywriteid='.$id.'');


while($array=mysql_fetch_array($rs)){

$day[date('Y-m-d',$array['diarytime'])]=true;



}
echo "ID是：".$id."  时间是：".$array['diarytime']."  天数是：".count($day)."<br/>";
?>