Re: include() in a file incuded()

From: Date: Mon, 21 May 2001 10:35:21 +0000
Subject: Re: include() in a file incuded()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53685@lists.php.net to get a copy of this message
On Sunday 20 May 2001 19:39, Jaime Torres wrote: > I've been blocked by this tiny problem... > > I have a main.php file: > > <? > $frames = true; > $open = "http://myserver.com/info.html"; > if ($frames) > { > include ("frameset.php"); > } > ?> > > The frameset.php looks like (omitting almost all the HTML): > <frameset rows="100,*" border="0"> > <frame src="onlineview.php3"> > <frame src="footer.html"> > </frameset> > > In the onlineview.php file I need to use the $open URL defined before, > but it isn't defined here. What am I doing wrong? How can I get $open's > value from this file? (1) $open is defined in frameset.php (2) frameset.php outputs a HTML page with the frameset definition (3) when the browser receives this, it issues two new requests, one for "onlineview.php3" and one for "footer.html" So you don't *include* onlineview.php3, you just reference it in the HTML code. do a <frame src="onlineview.php3?open=<?= rawurlencode ($open) ?>"> instead (i.e. pass $open as parameter to onlineview.php3). -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Those who will not reason, are bigots, those who cannot, are fools, and those who dare not, are slaves. - George Gordon Noel Byron (1788-1824), [Lord Byron]

« previous php.general (#53685) next »