我在数据库中显示事件但在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!');
}}
});