Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-07-2002, 01:16 AM   PM User | #1
gorilla1
Regular Coder

 
Join Date: Jun 2002
Posts: 544
Thanks: 0
Thanked 0 Times in 0 Posts
gorilla1 is an unknown quantity at this point
PHP equivalent of response buffer true?

Is there a php equivalent of the ASP: Response.Buffer = true
(which causes all scripts to be executed before anything gets rendered to the page.)

G
gorilla1 is offline   Reply With Quote
Old 08-07-2002, 02:05 AM   PM User | #2
gorilla1
Regular Coder

 
Join Date: Jun 2002
Posts: 544
Thanks: 0
Thanked 0 Times in 0 Posts
gorilla1 is an unknown quantity at this point
I gather ob_start must be it?

G
gorilla1 is offline   Reply With Quote
Old 08-07-2002, 12:11 PM   PM User | #3
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,911
Thanks: 5
Thanked 80 Times in 79 Posts
firepages will become famous soon enough
yup - thats it ...

i.e. readfile($file) in PHP outputs the contents of file directly to screen & there is no normal way of manipulating its contents but you can use ob_start() & friends


PHP Code:
<?
ob_start
();
//can't normally get at the files contents (using readfile())
readfile('yaks.txt');
//so grab the contents of the buffer//
$str ob_get_contents();
//do something pointless to $str... because we can//
$str=nl2br(strrev($str));
ob_end_clean();
echo 
$str;
?>
__________________
resistance is...

MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)
firepages is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:31 AM.


Advertisement
Log in to turn off these ads.