readfile
(PHP 4, PHP 5)
readfile — Outputs a file
Beskrivelse
Reads a file and writes it to the output buffer.
Parameterliste
- 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.
Returneringsværdier
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.
Notes
Du kan bruge en URL som filnavn med denne funktion, hvis fopen wrappers er slået til. Se fopen() for flere detaljer omkring hvordan man udformer filnavnet og List of Supported Protocols/Wrappers for en liste over understøttede URL-protokoller.
Note: Kontekst understøttelse blev tilføjet i PHP 5.0.0.