By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,040 Members | 788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,040 IT Pros & Developers. It's quick & easy.

require

P: n/a
Tom
hi i want to require or include a file in my php script.

the file i want to include contains some variables and some normal html.

i want to get the values of the variable without displaying the html stuff.

Any idea how i could this ?

thanks in advance
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Perhaps you could put your variables in a different file, and have both of
your present files require or include it? Other than that, I have no idea...

Manitoba98XP
"Tom" <to*@fakeemailaddresss.com> wrote in message
news:Rg******************@news-binary.blueyonder.co.uk...
hi i want to require or include a file in my php script.

the file i want to include contains some variables and some normal html.

i want to get the values of the variable without displaying the html stuff.
Any idea how i could this ?

thanks in advance

Jul 17 '05 #2

P: n/a
["Followup-To:" header set to comp.lang.php.]
Tom wrote:
hi i want to require or include a file in my php script.

the file i want to include contains some variables and some normal html.

i want to get the values of the variable without displaying the html stuff.

Any idea how i could this ?


1. start output buffering
2. include (or require) the file
3. stop buffering and disregard the data

Links:
http://www.php.net/ob_start
http://www.php.net/ob_end_clean

--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.