helpers/download – Kohana API 2.3 Documentation

system/helpers/download.php

Class: download_Core

class download_Core

Download helper class.


Methods

download_Core :: force

public static function force

Force 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.

Parameters:

string filename
(NULL) a file path or file name
mixed data
(NULL) data to be sent if the filename does not exist
string nicename
(NULL) suggested filename to display in the download

Return: void