Код: Выделить всё
public function download($id)
{
$this->load->helper('download');
$fileinfo = $this->profile_model->download($id);
$file = 'uploads/'.$fileinfo['file_name'];
force_download($file, NULL);
}
public function do_upload()
{
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = 100;
$config['max_width'] = 1024;
$config['max_height'] = 768;
$this->load->library('upload', $config);
if (!$this->upload->do_upload('userfile')) {
$error = array('error' => $this->upload->display_errors());
$this->load->view('upload_form', $error);
} else {
$data = array('upload_data' => $this->upload->data());
$this->load->view('upload_success', $data);
}
}
Код: Выделить всё
public function download($id)
{
$query = $this->db->get_where('upload_cv',array('id'=>$id));
return $query->row_array();
}
Серьезность: Примечание
Сообщение: Неопределенное свойство: Profile_controller::$profile_model
Имя файла: контроллеры/profile_controller.php
Номер строки: 137
Отслеживание:
Файл:
E:\xampp\htdocs\jobportal\application\controllers\profile_controller.php
Строка: 137 Функция: _error_handler
Файл: E:\xampp\htdocs\jobportal\index.php Строка: 315 Функция:
require_once.
Обнаружена ошибка PHP. Серьезность: ошибка
Сообщение: вызов функции-члена download() по нулевому значению
Имя файла: контроллеры/profile_controller.php
Номер строки: 137
Обратная трассировка:
Подробнее здесь: https://stackoverflow.com/questions/661 ... odeigniter
Мобильная версия