Welcome Guest, Not a member yet? Register   Sign In
file explorer and force_download
#6

[eluser]peter222[/eluser]
Finally my working index function in download controller looks like this:

example link:

Code:
<a href="http://mysite.com/download/index/folder/subfolder/subfolder/[email protected]#$.jpg">[email protected]#$.jpg</a>

index function code:

Code:
$data = file_get_contents(rtrim($this->config->item('myuploadfolder'), '/').str_replace("download/index/","",rawurldecode(uri_string())));
$name = $this->uri->segment($this->uri->total_segments());
force_download(rawurldecode($name), $data);


Messages In This Thread
file explorer and force_download - by El Forum - 01-20-2010, 03:58 PM
file explorer and force_download - by El Forum - 01-20-2010, 04:02 PM
file explorer and force_download - by El Forum - 01-21-2010, 03:51 AM
file explorer and force_download - by El Forum - 01-21-2010, 04:58 AM
file explorer and force_download - by El Forum - 01-21-2010, 07:26 AM
file explorer and force_download - by El Forum - 01-21-2010, 08:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB