Re: Problem with include()

From: Date: Tue, 13 Nov 2001 15:56:47 +0000
Subject: Re: Problem with include()
References: 1 2 3 4 5 6  Groups: php.db 
Request: Send a blank email to php-db+get-14287@lists.php.net to get a copy of this message
Bruno, I just come on to post a message saying I got it working....exactly the way you mention. Problem I had was I adhered too closely to an example in the manual :) Thanks for your help. -torrent "Bruno Gimenes Pereti" <pereti@ump.edu.br> wrote in message news:00c201c16c5b$1028fd30$6300a8c0@Metropolitana.administracao... > Try this way: > > in your php script: > $foo = "something"; > include("path/file.php"); > print "$bar"; > > in your file.php (included): > globals $foo; > > $bar = $foo." working"; > > I think this example will help... > > Bruno. > > ----- Original Message ----- > From: "TorrentUK" <torrent@ski-info-online.com> > To: <php-db@lists.php.net> > Sent: Tuesday, November 13, 2001 1:16 PM > Subject: Re: [PHP-DB] Problem with include() > > > > According to the php manual it can pass args and values. > > > > The value I pass in through the $id then determines what poll is > presented > > to the visitor (poll.php opens a file called $id.txt, which contains the > > poll's title, values, etc). So I set the id variable depending on where > the > > poll script is invoked (i.e. what will the visitor be voting for at this > > point). > > > > I'm confused. I going to have to think of a work-around (sometimes known > as > > a kludge :) ) > > > > Thanks > > -torrent >

« previous php.db (#14287) next »