How to download file from server using $ _SERVER ['DOCUMENT_ROOT']
3 answers
You can use this - root_path , link link Definition of root path
function download_file ($user_id, $file_row_id)
{
$this->load->helper('download');
$name = $this->model->download_file($user_id, $file_row_id);
output_file(ROOT_PATH. 'images/user/uploaded_files/' . $name['uploaded_file_name'], $name['original_file_name'], '', true);
}
0
source to share