fullcalendar访问不同域中的PHP

时间:2015-05-12 15:49:44

标签: php json events dns fullcalendar

我在数据库中显示事件但在localhost中,但是如何从其他域访问php文件?

这是我的代码:

$('#calendar').fullCalendar({
                    header: {
                        left: 'title',
                        right: 'prev,next today',
                        //right: 'month,agendaWeek,agendaDay'
                    },
                    //defaultDate: '2015-04-12',
                    lang: currentLangCode,
                    buttonIcons: false, // show the prev/next text
                    weekNumbers: false,
                    eventLimit: true, // allow "more" link when too many events
                    eventClick: function(event){
                         $('#modalTitle').html(event.title);
                         $('#modalBody').html(event.descripcio);
                         $('#fullCalModal').modal();
                     },
                    events: {
                            url: 'php/get-events.php',

                        error: function() {
                            alert('there was an error while fetching events!');
                        }}

                });

0 个答案:

没有答案