Re: Problem with include()
| From: | TorrentUK | Date: | Tue, 13 Nov 2001 15:16:26 +0000 |
| Subject: | Re: Problem with include() | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14284@lists.php.net to get a copy of this message | ||
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
"Bruno Gimenes Pereti" <pereti@ump.edu.br> wrote in message
news:008a01c16c48$d3ba94b0$6300a8c0@Metropolitana.administracao...
> Does include accept parameter?
> I have never tried.
>
> I think php will try to find a file called "poll.php?id=KnChooseBoots" not
a
> file called poll and give argument for it. Also why do you need to put the
> parameter if the variable id is already set?
>
> Bruno.
>
> ----- Original Message -----
> From: "TorrentUK" <torrent@ski-info-online.com>
> To: <php-db@lists.php.net>
> Sent: Tuesday, November 13, 2001 11:24 AM
> Subject: Re: [PHP-DB] Problem with include()
>
>
> > Hi Peter,
> >
> > I'll be surprised if that's it as I am running this through an Apache
> server
> > which insists on the \ being /
> > Also all references to my images are / and they work fine. In fact, I
> think
> > I mentioned, it calls the poll.php
> > if I drop the argument part (?id=KnChooseBoots). It's all very strange.
> >
> > Thanks for the response. I might just give your suggestion just to be
> sure.
> > Rgds
> > -torrent
> >
> > "Peter Lovatt" <pjln1@sunmaia.net> wrote in message
> > news:NFBBKAGAILLHPFOOAKFIEEGKCFAA.pjln1@sunmaia.net...
> > > Could it be windows doesn't like the '/' in the path. OK on a webpage,
> but
> > > not directly into the filesystem?
> > >
> > > Peter
> > >
> > > > -----Original Message-----
> > > > From: TorrentUK [mailto:torrent@ski-info-online.com]
> > > > Sent: 13 November 2001 12:47
> > > > To: php-db@lists.php.net
> > > > Subject: [PHP-DB] Problem with include()
> > > >
> > > >
> > > > Can anyone spot why I get the error
> > > >
> > > > Warning: Failed opening
> > > > 'd:/www/htdocs/ski-info-online/poll.php?id=KnChooseBoots' for
> inclusion
> > > > (include_path='') in
> > > > d:\WWW\htdocs/ski-info-online/skiKnSkiBoots.php on line
> > > > 113
> > > >
> > > > Here is the calling line:
> > > >
> > > > <?php include($DOCUMENT_ROOT .
> > > > "/ski-info-online/poll.php?id=KnChooseBoots"); ?>
> > > >
> > > > If I call poll.php?id=KnChooseBoots from the browser it works
(exactly
> > the
> > > > same path).
> > > > If I drop the argument it works (i.e. php include($DOCUMENT_ROOT .
> > > > "/ski-info-online/poll.php"); ).
> > > > So what the blazes is happening?
> > > >
> > > > The manual reads:
> > > >
> > > > /* Works. */
> > > > include
> > > > ("http://someserver/file.php?varone=1&vartwo=2");
> > > >
> > > > and...
> > > >
> > > > require($DOCUMENT_ROOT . "/header.html");
> > > >
> > > > which are the techniques I think I have used.
> > > > Thanks for any help
> > > > -torrent
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Database Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> > > > For additional commands, e-mail: php-db-help@lists.php.net
> > > > To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
> > >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-db-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>