Topic awaiting preservation: Capturing an include() in PHP |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 01-08-2002 17:51
Say I want to build a $page_display like so: |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 01-08-2002 18:31
well, either by calling the include when you need it, or by using php's outputbuffering functionallity. for a start, take the manual and look into ob_start(). |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 01-08-2002 19:11
Butcher, I would suggest you to read include() page from PHP manual thoroughly to familiarize yourself how includes work and how you can return some value from included file... |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 01-08-2002 23:12
Thanks TP, I was reading the manual and I could probably use that, I'll have to do some more reading to put it to use. |
Paranoid (IV) Inmate From: Lebanon |
posted 01-09-2002 06:12
Butcher, if your include file has just plain text and no PHP code at all, then use something like: |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 01-09-2002 06:45 |
Maniac (V) Inmate From: Brisbane, Australia |
posted 01-09-2002 09:17
Yeah, the .inc thing is bad. However I still can't seem to kick the habbit so I had my sys admin add the .inc extention so apache would phrase it as a php script. |