在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()我返回查询结果。有人请帮助!!!