Re: include file with parameters

From: Date: Tue, 12 Nov 2002 13:33:23 +0000
Subject: Re: include file with parameters
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-123983@lists.php.net to get a copy of this message
> On Tuesday 12 November 2002 15:55, Fikret CAN wrote: > > hello PHP developers, > > > > I am going to convert a site that works with frames to the equivalent with > > includes. I have several template files whic behaves according to query > > string parameters. I don't want to make big changes, just make it work. > > <?php > > include("tmplt1.php?var1=val1&var2=val2"); > > ?> You don't need to pass vars to an include file. Whatever variables are available to the main script at the time of the include() are available to the included file. It's the same as copying that code into your main file at that point. ---John Holmes...

« previous php.general (#123983) next »