我想迭代foreach循环以获取属性详细信息列表,但是此代码没有显示任何内容请任何人告诉我我的代码中有什么问题 我是php的新手。
$(document).ready(function() {
var dragfingDate;
$('#calendar').fullCalendar({
//defaultDate: '2015-02-12',
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [ here my events ],
eventDrop : function(event,revertFunc)
{
//var moment = $('#calendar').fullCalendar('getDate');
//alert("The current date of the calendar is " + moment.format("YYYY-MM-DD"));
var dropedDate = event.start.format("YYYY-MM-DD");
alert(dropedDate);
var todayDate = $('#calendar').fullCalendar('getDate');
var today_newformatDate = todayDate.format("YYYY-MM-DD");
alert(today_newformatDate);
if(dropedDate < today_newformatDate)
{
alert("can not move previous dates.");
revertFunc();
//$('#calendar').fullCalendar('selectable', false);
}
else
{
//alert("can move to next dates.");
var r = confirm("Are sure want to shift?");
if(r == true)
{
// here is my ajax code to updte DB
//alert("droped "+event.title +"on date of "+event.start.format("YYYY-MM-DD"));
}
else
{
revertFunc();
}
}
}
});
答案 0 :(得分:3)
您的文件行不正确
< php foreach($this->Property_Model->getProperty() as $property): ?>
你忘记了php标记中的?
应该是
<?php foreach($this->Property_Model->getProperty() as $property): ?>
您可以在控制器中调用您的模型而不是视图