You are here: Re: session IDs and the like « PHP Programming Language « IT news, forums, messages
Re: session IDs and the like

Posted by windandwaves on 11/07/07 11:31

Berimor wrote:
.....
> Note: As of PHP 4, you can use output buffering to send output prior
> to the call of this function, with the overhead of all of your output
> to the browser being buffered in the server until you send it. You
> can do this by calling ob_start() and ob_end_flush() in your script,
> or setting the output_buffering configuration directive on in your
> php.ini or server configuration files.


I just started to use this. It is absolutely f. brilliant! I now delete
any extra spaces in my html using this system using the function below:

function trimmer($buffer) {
$buffer = preg_replace("/[\r\n]+[\s\t]*[\r\n]+/","\n",$buffer); //strip
blank lines (blank, with tab or whitespaces)
$buffer = trim(str_replace("\r\n", " ", $buffer)); //removes line-breaks
$buffer = trim(str_replace("\n", " ", $buffer));
$buffer = trim(str_replace("\t", " ", $buffer)); //removes tabs
$buffer = trim(eregi_replace(" +", " ", $buffer)); //removes spaces
return $buffer;
}

Works a treat. It makes the loading funny, because before I used this
function, I would slowly see the page being developed on the screen, while
now, you see a blank space for about a second and then the whole page shows
up at once. Something I also noticed on www.cnn.com, while my local
newspaper www.stuff.co.nz does it my old way (you slowly see the page being
build).

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация