Method SendFile()


 

Syntax

:SendFile( cFile, [cMIMEType] ) --> nBytes

 

Parameters

 

cFile

File name, including path, of the File to send back to the User.

 

cMIMEType

The type of File being sent. example: "text/html", "image/gif", "application/msword", etc.

 

 

Return

Number of Bytes sent to the Browser.

If no error occurred, the value of nBytes and FSize(cFile) should be the same.

 

Description

Send a file to the User.

The MIME Type is required in order to tell the User's Browser how to handle the file.

If cMIMEType is not provided, it will default to "application/" + the file extension.

If sending back non-binary information, "text/html" should work.

 

See Also:

:Redirect(), :Start(), :Message(), :Write()

 

 



Contents