RE: [PHP] include() in a file incuded()

From: Date: Sun, 20 May 2001 18:57:33 +0000
Subject: RE: [PHP] include() in a file incuded()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53625@lists.php.net to get a copy of this message
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: <frame src=<? echo $open."?another_var=".$another_val; ?>> The big question is including a file from an included file passes the values of the variables defined in the parent? Regads, Jaime -----Mensaje original----- De: George E. Papadakis [mailto:georgep@phaistosnetworks.gr] 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 <frame src="onlineview.php3"> with <frame src=<? echo $open;?>> 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): > <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? > > Thanks! > > Jaime > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#53625) next »