[eluser]The Casual Bot[/eluser]
hey everyone
any one used the download helper
i got it to work (sort of)
however the file once download wont work apart from one pdf
and csv files but at the beginning of the csv files its add a few characters
so im guessing this is why some of the other files arent working
any ideas
Code:
function downloadfile() {
$this->load->helper('download');
$name = $_POST['name'];
$path ="/home/sites/mysite.co.uk/public_html/files/".$_POST['id']."/".$_POST['name'];
$data = file_get_contents($path);
force_download($name, $data);
}