Answers for "how to download a file from public directory in ci"

0

how to download a file from public directory in ci

public function download($file)
{

$this->load->helper('download');
$name = $file;
$data = file_get_contents('./uploads/foldername/'.$file); 
force_download($name, $data); 
    redirect('index','refresh');
}
Posted by: Guest on June-17-2021

Code answers related to "how to download a file from public directory in ci"

Browse Popular Code Answers by Language