【问题标题】:send POST data from calendar to json_events.php将 POST 数据从日历发送到 json_events.php
【发布时间】:2012-11-07 20:59:42
【问题描述】:

我想这很简单,但我不太清楚这个概念。
基本上我正在加载上一个/下一个点击事件

viewDisplay: function(view) { var next = view.title;  }, //alert(next);

给我“2012 年 11 月”
拆分这个 然后

events:  { 
url: 'json-events.php',  
type: 'POST',  <br/>
data: { month: month,  
year: year } }, 

那么,如何读取 json-events.php 中的 POST val 假设我在这里走在正确的轨道上。 [超级新手]

【问题讨论】:

    标签: fullcalendar


    【解决方案1】:

    用作对象引用http://arshaw.com/fullcalendar/docs/event_data/Event_Object/

    <?php
    //obtain params
    $month = $_POST["month"];
    $year = $_POST["year"];
    
    //... get the list of events due to month and year
    
    //create an events array due to docs
    $events = array(array('id' => 1, 'title' => 'Event', 'allDay' => true)); 
    
    //return json feed
    echo json_encode($events);
    ?>
    

    【讨论】:

      猜你喜欢
      • 2016-07-31
      • 2015-02-08
      • 2012-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-15
      • 2019-07-26
      • 2020-12-22
      相关资源
      最近更新 更多