Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
687 B
2
Indexable
Never
if (!empty($_FILES['dataijk']['name'])) {
	$new_name                   = 'dt' . time() . '_' . $_FILES["dataijk"]['name'];
	$config['file_name']        = $new_name;
	$config['upload_path']      = "./upload/ijk";
	$config['allowed_types']    = '*';
	$this->load->library('upload', $config);
	$this->upload->initialize($config);
	if (!$this->upload->do_upload('dataijk')) {
	  var_dump($this->upload->display_errors());
	} else {
	  $image_data           = $this->upload->data();
	  $fileExcel    			= $image_data['file_name'];
	}
}
$spreadsheet    = $reader->load('upload/ijk/'.$fileExcel);
$sheet 			= $spreadsheet->getActiveSheet()->toArray();
$data['sheet']  = $sheet;