Download given text content file.
App::Utility()->downloadInline(data, [File Name], [Content Type])
Parameter |
Description |
---|---|
Path |
Path of the file to download |
File Name |
Download file name. By default set "download.txt". |
Content Type |
Content Type of the file for example "application/pdf" by default set "text/txt" |
See bellow example:
// Example 1
$data = "Hello World";
echo App::Utility()->downloadInline($data, "test.txt");