在控制器中获取无效参数错误

时间:2018-03-21 08:51:27

标签: php codeigniter

在CI中设计应用程序并遇到了这个奇怪的问题。下面是控制器

<div class='input-group date' id='datetimepicker1'>
  <input type='date' id="startDate" data-bind="value: startDate()" class="form-control" value="2018-03-21" oninput="parse()" />
  <span class="input-group-addon">
        <span class="glyphicon glyphicon-calendar"></span>
  </span>
  <span class="input-group-addon">
        <span onclick="startToday()">Today</span>
  </span>
</div>

以下是模态

$list = $this->client->get_datatables();

    $data = array();
    $no = $_POST['start'];


        foreach ($list as $client) {
        $no++;
        $row = array();
        $client=(array)$client;
        $row[] = isset($client['name'])?$client['name']:"---";
        $row[] = isset($client['city'])?$client['city']:"---";
        $row[] = isset($client['amount_due'])?"Rs.".$client['amount_due']:"Rs.00.00";
        $row[] = isset($client['lastdispatch'])?$client['lastdispatch']:"---";
        $row[] = isset($client['lastbill'])?$client['lastbill']:"--";
        $row[] = isset($client['lastpayment'])?$client['lastpayment']:"---";
    }

    $output = array(
                    "draw" => $_POST['draw'],
                    //"recordsTotal" => $this->person->count_all(),
                    //"recordsFiltered" => $this->person->count_filtered(),
                    "recordsTotal" => $this->client->count_all(),
                    "recordsFiltered" => $this->client->count_filtered(),
                    "data" => $data,
            );

    //output to json format
    echo json_encode($output);
}

在编译应用程序时,我在每一行的控制器中都是无效的参数错误。我不知道我哪里出错了,而不是使用get()我返回查询结果。有人请帮助!!!

0 个答案:

没有答案