function day_unix($time = '', $unix = FALSE) { if (is_string($time)) { $r = day_human(strtotime($time), $unix); } else { $r = day_human($time, $unix); } return strtotime($r); }
public function index() { //if (!$this->input->is_ajax_request()) { // show_404(); //} // 消除 notice // error_reporting(E_ALL | E_STRICT); error_reporting(0); // 获得日期中的上传,否则为当天 // 全部的则要另外写了 $this->load->helper('date'); $date = $this->input->get('dt', TRUE); if ($d = check_date($date)) { $dir = day_human($d); } else { $dir = TRUE; } $config = array('script_url' => current_url(), 'upload_url' => '', 'upload_dir' => UPLOAD_PATH, 'param_name' => 'files', 'user_dirs' => $dir, 'random_file_name' => TRUE, 'inline_file_types' => '/\\.(' . $this->mcfg->get('upload', 'inline_file_types') . ')$/i', 'accept_file_types' => '/\\.(' . $this->mcfg->get('upload', 'inline_file_types') . ')$/i'); header('Content-type: text/json'); $this->load->library('UploadHandler', $config); $this->UploadHandler; }