Re: Problem with include()

From: Date: Tue, 13 Nov 2001 15:51:30 +0000
Subject: Re: Problem with include()
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-14285@lists.php.net to get a copy of this message
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 (#14285) next »