| Status | Draft |
|---|---|
| Todo | Proof read |
The download helper assists in forcing downloading of files by presenting users with the “save as” dialog.
'force' forces a download of a file to the user's browser. This function is binary-safe and will work with any MIME type that Kohana is aware of.
Example:
// File path is relative to the front controller download::force("file.txt"); // For a file located in application/downloads // Use relative path download::force('./application/downloads/file.txt'); // OR use the defined application path download::force(APPPATH.'downloads/file.txt');