联系官方销售客服
1835022288
028-61286886
if(IS_POST){
$post = \Phpcmf\Service::L('input')->post('data');
if(IS_AJAX){
$post['stime'] = \Phpcmf\Service::L('input')->post('stime');
$post['etime'] = \Phpcmf\Service::L('input')->post('etime');
}else{
$post['stime'] = strtotime($post['stime']);
$post['etime'] = strtotime($post['etime']) + 86399;
}
}
查询按钮是用’IS_POST‘来判断,查询是没有问题的。导出用的是’ajax‘提交查询,代码如上,’IS_AJAX‘这里进不来,这是为什么呢?
if(IS_POST){
$post = \Phpcmf\Service::L('input')->post('data');
if(IS_AJAX){
$post['stime'] = \Phpcmf\Service::L('input')->post('stime');
$post['etime'] = \Phpcmf\Service::L('input')->post('etime');
}else{
$post['stime'] = strtotime($post['stime']);
$post['etime'] = strtotime($post['etime']) + 86399;
}
}