Мой контроллер:
публичная функция save_data_apk(){
Код: Выделить всё
$config['upload_path'] = './upload_apk_file/';
$config['allowed_types'] = 'apk';
$config['max_size'] = 0; // No size limit
$config['max_width'] = 0; // No width limit
$config['max_height'] = 0; // No height limit
$config['encrypt_name'] = false;
$this->load->library('upload', $config);
$this->load->library('form_validation');
$this->upload->initialize($config);
if($this->upload->do_upload('apk_files')) {
$apk_data = $this->upload->data();
$apk_files = $apk_data['file_name'];
$version = $this->input->post('version');
$apkname = $this->input->post('application_name');
$note = $this->input->post('note');
$location = $this->input->post('location');
$created_at = $this->input->post('created_at');
$this->load->model('M_Mobile_apk', '_model'); // Load model if not loaded already
$this->_model->save_data_apk($version,$apk_files, $apkname,$created_at, $note, $location);
$this->session->set_flashdata('success_message', 'Berhasil menyimpan data ');
redirect('mobile_apk');
}else{
$this->session->set_flashdata('failed_message', 'Harap upload file!');
redirect('mobile_apk');
}
}
'apk' => 'application/vnd.android.package-archive'
Что случилось с моим кодом... пожалуйста, помогите мне.
Просто ответьте на мой ожидаемый вопрос.
Подробнее здесь: https://stackoverflow.com/questions/787 ... eigniter-3
Мобильная версия