Php fullcalendar事件不工作

Php fullcalendar事件不工作,php,javascript,json,fullcalendar,Php,Javascript,Json,Fullcalendar,我正在使用fullcalendar来显示事件,我使用JSON来显示事件,并从另一个页面获取JSON对象,但每当我使用treid时,我都会收到此500内部服务器错误我在stackoverflow中找到一个queston,并使用了它们的代码 这是我的Javascript代码: $(document).ready(function() { $('#calendar').fullCalendar({

我正在使用fullcalendar来显示事件,我使用JSON来显示事件,并从另一个页面获取JSON对象,但每当我使用treid时,我都会收到此
500内部服务器错误
我在stackoverflow中找到一个queston,并使用了它们的代码

这是我的Javascript代码:

  $(document).ready(function() {

        $('#calendar').fullCalendar({                                 
            editable: false,
           events:'/json.php'
        });
    });

</script>

问题是
json\u encode
然后我使用了
Zend\u json::encode
生成json对象的是Zend类

<?php
require_once('Json.php');

$sql="select t.trans_id,r.res_name,l.location_name,to_char(t.trans_date,'mm/dd/yyyy'),s.ts_from,s.ts_to,t.booked_units,t.max_value,t.remaining
from tsm_transaction_tbl t,tsm_location_tbl l,tsm_resource_tbl r,tsm_timeslot_tbl s
where t.location_id=l.location_id and t.resource_id=r.res_id and t.ts_id=s.ts_id";
$parse=oci_parse($conn,$sql);
oci_execute($parse);
$events = array();
while($row=oci_fetch_array($parse))
{
    $start = $row[3];
    $end = $row[3];
    $title = $row[1];

    $eventsArray['id'] =  $row[0];
    $eventsArray['title'] = $title;
    $eventsArray['start'] = $start." ".$row[4].":00:00";
    $eventsArray['end'] = $end." ".$row[5].":00:00";
    $eventsArray['allDay'] = false;
    $eventsArray['description']="Timeslot: ".$row[4]."-".$row[5]."<br> Location: ".$row[2]."<br> Max value: ".$row[7]."<br>Booked units: ".$row[6]."<br> Remaining: ".$row[8];
    $events[] = $eventsArray;
}
oci_close($conn);

echo Zend_Json::encode($events);

?>

“500内部服务器错误”与fullcalendar问题无关,因此是服务器问题。请将您的Web服务器日志文件的信息添加到您的帖子中。感谢您的回复。我发现问题是json_编码不起作用
<?php
require_once('Json.php');

$sql="select t.trans_id,r.res_name,l.location_name,to_char(t.trans_date,'mm/dd/yyyy'),s.ts_from,s.ts_to,t.booked_units,t.max_value,t.remaining
from tsm_transaction_tbl t,tsm_location_tbl l,tsm_resource_tbl r,tsm_timeslot_tbl s
where t.location_id=l.location_id and t.resource_id=r.res_id and t.ts_id=s.ts_id";
$parse=oci_parse($conn,$sql);
oci_execute($parse);
$events = array();
while($row=oci_fetch_array($parse))
{
    $start = $row[3];
    $end = $row[3];
    $title = $row[1];

    $eventsArray['id'] =  $row[0];
    $eventsArray['title'] = $title;
    $eventsArray['start'] = $start." ".$row[4].":00:00";
    $eventsArray['end'] = $end." ".$row[5].":00:00";
    $eventsArray['allDay'] = false;
    $eventsArray['description']="Timeslot: ".$row[4]."-".$row[5]."<br> Location: ".$row[2]."<br> Max value: ".$row[7]."<br>Booked units: ".$row[6]."<br> Remaining: ".$row[8];
    $events[] = $eventsArray;
}
oci_close($conn);

echo Zend_Json::encode($events);

?>