Php fullcalendar获取事件(json)和开始、结束当前视图参数?

Php fullcalendar获取事件(json)和开始、结束当前视图参数?,php,json,fullcalendar,Php,Json,Fullcalendar,我试图根据开始和结束参数每月显示数据库中的事件,但我无法实现我的目标,这是我的代码,有帮助吗 events: function(start, end, timezone, callback) { $.ajax({ url: 'php/asignacion/events.php', dataType: 'json', type:"POST", data: {

我试图根据开始和结束参数每月显示数据库中的事件,但我无法实现我的目标,这是我的代码,有帮助吗

 events: function(start, end, timezone, callback) {
        $.ajax({
            url: 'php/asignacion/events.php',
            dataType: 'json',
            type:"POST",
            data: {

                start: start.format('YYYY/MM/DD HH:mm'),
                end: end.format('YYYY/MM/DD HH:mm')
            },
            success: function(doc) {
              //alert(doc);
                var events = [];
                $(doc).find('event').each(function() {
                    events.push({
                        id: $(this).attr('start'),
                        title: $(this).attr('title'),
                        start: $(this).attr('start'),
                        end: $(this).attr('end'),
                        cantidad: $(this).attr('cantidad')
                    });
                });
               callback(events);
            },
            error:function(doc){
              alert("error");
            }
        });
    }
PHP脚本

$json = array();
date_default_timezone_set("Chile/Continental");
$sql="SELECT id,title,start,end,cantidad FROM turnos_asignacion 
where start between '".$_POST["start"]."' and '".$_POST["end"]."' order by start asc";

$res=mysqli_query($conexion,$sql);
while ($row=mysqli_fetch_assoc($res)) {
    $json[]=$row;
}
echo json_encode($json);
mysqli_close($conexion);

开始时间和结束时间格式应类似于“2014-11-09T16:00:00”。

请说明您的问题,“我无法实现我的目标”不是一个很好的问题描述未显示事件,或发现错误。这就是问题所在。