PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Sat Jul 29, 2006 10:30 am
Is there someway to hide or not print the output of an include file? I have this already:
Code: Select all
print('<!--');
include("include.php");
print('-->');
Which still prints it output in the HTML but puts it in a comment. But I want to make it so that PHP doesn't even print/echo out anything so I can remove the to prints
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Sat Jul 29, 2006 10:48 am
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Sat Jul 29, 2006 10:51 am
Whooaaa.... I was beginning to wonder if you actually existed or not
Hello
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Sat Jul 29, 2006 10:51 am
OK i know how to use ob_start but not in this way, can someone explain how to do this or something... i'll keep reading and stuff but anyone that wants to help do so. THANKS!
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Sat Jul 29, 2006 11:02 am
The "surrounding" script starts a buffer.
The included script's output is put into this buffer.
The "surrounding" script
Get's you nowhere if the included script flushes the buffer itself, but maybe it's sufficient.
d11wtq wrote: Whooaaa.... I was beginning to wonder if you actually existed or not
the time for the next incarnation has come.
So this makes me the third(?) volka?
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Sat Jul 29, 2006 11:13 am
Whoa....from out of nowhere, he returns!!
Welcome back
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Sat Jul 29, 2006 12:38 pm
volka wrote: The "surrounding" script starts a buffer.
The included script's output is put into this buffer.
The "surrounding" script
Get's you nowhere if the included script flushes the buffer itself, but maybe it's sufficient.
d11wtq wrote: Whooaaa.... I was beginning to wonder if you actually existed or not
the time for the next incarnation has come.
So this makes me the third(?) volka?
Thanks! It worked.
m3mn0n
PHP Evangelist
Posts: 3548 Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada
Post
by m3mn0n » Sun Jul 30, 2006 11:03 am
volka!! heya!