readfileOutputs a file
&reftitle.description;
intreadfilestringfilenamebooluse_include_pathfalseresourcecontext
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. If an error
occurs, &false; is returned and unless the function was called as
@readfile, an error message is printed.
&reftitle.examples;
Forcing a download using readfile
]]>
&example.outputs.similar;
Open / Save dialoguereadfile 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.
&reftitle.notes;
&tip.fopen-wrapper;
¬e.context-support;
&reftitle.seealso;
fpassthrufilefopenincluderequirevirtualfile_get_contents