readfileOutputs a file
&reftitle.description;
intfalsereadfilestringfilenamebooluse_include_path&false;resourcecontext
Reads a file and writes it to the output buffer.
&reftitle.parameters;
filename
The filename being read.
use_include_path
You can use the optional second parameter and set it to &true;, if
you want to search for the file in the include_path, too.
context
A context stream resource.
&reftitle.returnvalues;
Returns the number of bytes read from the file on success,
&return.falseforfailure;
&reftitle.errors;
&fs.emits.warning.on.failure;
&reftitle.examples;
Forcing a download using readfile
]]>
&example.outputs.similar;
Open / Save dialogue
&reftitle.notes;
readfile will not present any memory issues,
even when sending large files, on its own. If you encounter an
out of memory error ensure that output buffering is off with
ob_get_level.
&tip.fopen-wrapper;
¬e.context-support;
&reftitle.seealso;
fpassthrufilefopenincluderequirevirtualfile_get_contents