FILE Methods

download()

The content of the filename passed will be provided as download-file. The file's mime() type will be set automatically. If you wish to create a dynamic download-file from inside your templates, use the page's download() function.

null download( string file [, bool namefix = true ])

Return

This method will stop the program's execution and output the file's content as download. Please note that this function will produce an error if the file doesn't exist. So always make sure that the file you are trying to download actually exists!

Parameter
Description
fileName and directory of file to be downloaded.
namefixWill decode filename and remove whitespace.

Click HERE to download file

1
if($NAVI->query('download')){$FILE->download($FILE->directory("test.txt", 3, 3));}
RETURN: FALSE