我正在使用 fullCalendar 并且它可以工作..直到现在..
我正在使用 Firefox,我看到我的脚本发送到日历的请求是fullCalendar.html
并且没有event.php?start=....
这是我的配置脚本:
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
firstDay:1,
defaultEventMinutes: 30, //default slot 30 minuti
axisFormat: 'HH:mm', //assi in agenda
timeFormat: 'HH:mm', //formato eventi
events: "fullCalendar/event.php"
});
});
这是我的 event.php:
<?
include("../database/config.php");
if(isset($_GET["start"])){
$data = date("Y-m-d", $_GET["start"]); //date("Y-m-d 00:00:00");
}else{
$data = date("Y-m-d");
}
$data = $data." 00:00:00";
$query = "SELECT * FROM calendario WHERE 'start' > '$data'";
$result = mysql_query($query, $db);
if ($result==FALSE) die("Errore nella composizione della query");
while ($row = mysql_fetch_array($result)){
$id = $row['id'];
$titolo = $row['titolo'];
$start = $row['start'];
$end = $row['end'];
$descr = $row['descr'];
$allDay = $row['allDay'];
if ($allDay == "1"){
$events[] = array(
'id' => "$id",
'title' => "$titolo",
'start' => "$start",
'end' => "$end",
'allDay' => true,
'descr' => "$descr"
);
}else{
$events[] = array(
'id' => "$id",
'title' => "$titolo",
'start' => "$start",
'end' => "$end",
'allDay' => false,
'descr' => "$descr"
);
}
}
echo json_encode($events);
?>
有人可以告诉我有什么问题吗?谢谢!