From f2e9012d54dfc2766daaccbfec9080d42d318e1c Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 3 Mar 2009 18:32:07 +0000 Subject: Echoing the large output buffer in chunks git-svn-id: https://code.elgg.org/elgg/trunk@3048 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 7 +++++-- simplecache/view.php | 13 +++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index e106e8bd8..7dc0e24a8 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1066,14 +1066,17 @@ function page_draw($title, $body, $sidebar = "") { // Draw the page - echo elgg_view('pageshells/pageshell', array( + $output = elgg_view('pageshells/pageshell', array( 'title' => $title, 'body' => $body, 'sidebar' => $sidebar, 'sysmessages' => system_messages(null,"") ) ); - + $split_output = str_split($output, 8192); + + foreach($split_output as $chunk) + echo $chunk; } /** diff --git a/simplecache/view.php b/simplecache/view.php index afc0f89ae..8d37a0cdc 100644 --- a/simplecache/view.php +++ b/simplecache/view.php @@ -60,11 +60,12 @@ header("Content-Length: " . strlen($contents)); } } - } - - // echo $contents; - $splitString = str_split($contents, 8192); - foreach($splitString as $chunk) - echo $chunk; + } + + $split_output = str_split($contents, 8192); + + foreach($split_output as $chunk) + echo $chunk; + ?> \ No newline at end of file -- cgit v1.2.3