Re: [PHP] include() in a file incuded()
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): > > > > > > 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 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] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] include() in a file incuded()
Thanks for your answer George. But I still have a problem. What if I need to get another variables values from the main.php file? Do I need to pass them with the URL? Something like: mailto:[EMAIL PROTECTED]] Enviado el: domingo 20 de mayo de 2001 13:22 Para: Jaime Torres; [PHP] General List Asunto: Re: [PHP] include() in a file incuded() Replace with > Variable $open is passed to the included file automatically. > Hi! > > 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): > > > > > > 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? > > Thanks! > > Jaime > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include() in a file incuded()
Replace with > Variable $open is passed to the included file automatically. > Hi! > > 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): > > > > > > 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? > > Thanks! > > Jaime > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]