Welcome Guest, Not a member yet? Register   Sign In
Multiple Views ?!?!
#3

[eluser]kylehase[/eluser]
Enabling the third parameter pulls the strings from the buffer. Will this affect performance? Would it be better to simply append new output data to the buffer then have some function to print the buffer?

From Loader.php
Code:
ob_start();

                // If the PHP installation does not support short tags we'll
                // do a little string replacement, changing the short tags
                // to standard PHP echo statements.

                if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)
                {
                        echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($path))).'<?php ');
                }
                else
                {
                        include($path);
                }

                log_message('debug', 'File loaded: '.$path);

                // Return the file data if requested

                /*-------- THIS SECTION IS RUN IF THE THIRD PARAMETER IS TRUE ----
                 * Notice that the buffer is cleared and returned  */

                if ($return === TRUE)  
                {
                        $buffer = ob_get_contents();
                        @ob_end_clean();
                        return $buffer;
                }

Notice the section :
Code:
if ($return === TRUE)
The output is buffered while in the Loader but is released if you set the third parameter to true.


Messages In This Thread
Multiple Views ?!?! - by El Forum - 10-14-2007, 11:05 AM
Multiple Views ?!?! - by El Forum - 10-14-2007, 11:55 AM
Multiple Views ?!?! - by El Forum - 11-01-2007, 08:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB