From 0d7e2a3615b4c54656d060c5e6c4659ceaf8fa00 Mon Sep 17 00:00:00 2001 From: Paul Reinheimer Date: Thu, 3 May 2012 21:57:45 +0000 Subject: [PATCH] - Adding note that the function does not use much memory unless you have output_buffering enabled. Hopefully this will help stem the tide of comments about weird looped fread() calls. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325523 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/filesystem/functions/readfile.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reference/filesystem/functions/readfile.xml b/reference/filesystem/functions/readfile.xml index c6779a9027..e4bd76ae78 100644 --- a/reference/filesystem/functions/readfile.xml +++ b/reference/filesystem/functions/readfile.xml @@ -101,10 +101,19 @@ if (file_exists($file)) { + + + 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. + + &reftitle.notes; &tip.fopen-wrapper; ¬e.context-support; +