Re: require with $_GET parameters
From: Er Galv?o Abbott (galvao_at_galvao.eti.br)
Date: 10/03/04
- Next message: Paul Barfoot: "Re: require with $_GET parameters"
- Previous message: Paul Barfoot: "Re: require with $_GET parameters"
- In reply to: Paul Barfoot: "Re: require with $_GET parameters"
- Next in thread: Paul Barfoot: "Re: require with $_GET parameters"
- Reply: Paul Barfoot: "Re: require with $_GET parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 3 Oct 2004 11:33:54 -0700
Sorry, I didn't explained enough:
I've added the entire physical path to the htdocs dir in the php.ini,
so I don't need to pass the entire URL or PATH.
As I've stated before, if I remove the parameters it works.
Any other ideas?
TIA,
__________________
Er Galvão Abbott
<? PHP ?> && #! Perl Programmer
"Paul Barfoot" <Paul@theglobalfamily.fsworld.co.uk> wrote in message news:<cjorh1$spk$1@news5.svr.pol.co.uk>...
> Hi
>
> You need to use the full URL if passing parameters - from the help file:
>
> /* Won't work; looks for a file named 'file.php?varone=1&vartwo=2'
> * on the local filesystem. */
> include ("file.php?varone=1&vartwo=2");
>
> /* Works. */
> include ("http://someserver/file.php?varone=1&vartwo=2");
>
> For your example:
>
> include('admin/header.php?item=Users&oper=Add'); won't work
>
> but
>
> include("http://yourserver/admin/header.php?item=Users&oper=Add"); will work
>
>
> HTH
>
> Paul Barfoot
>
>
> "Er Galv?o Abbott" <galvao@galvao.eti.br> wrote in message
> news:d9971ed2.0410021442.e555c5a@posting.google.com...
> > Greetings.
> >
> > I'm trying to do a require with get variables as below:
> >
> > require_once('admin/header.php?item=Users&oper=Add');
> >
> > So I can dynamically show the header as 'Add Users'.
> >
> > Require is failing as it would be considering the parameters as part
> > of the filename.
> >
> > I've took a look at PHP's documentation and it states
> > (http://us2.php.net/manual/en/function.include.php):
> >
> > quote:
> > --------------------------------------------------------------------------------
> > // Works.
> > include 'http://www.example.com/file.php?foo=1&bar=2';
> > --------------------------------------------------------------------------------
> >
> > So I've tried replacing require for include, but it's still failing.
> >
> > If I remove the parameters it works.
> >
> > Is this possible?
> >
> > Please someone help.
> >
> > TIA,
> > __________________
> > Er Galvão Abbott
> > <? PHP ?> && #! Perl Programmer
- Next message: Paul Barfoot: "Re: require with $_GET parameters"
- Previous message: Paul Barfoot: "Re: require with $_GET parameters"
- In reply to: Paul Barfoot: "Re: require with $_GET parameters"
- Next in thread: Paul Barfoot: "Re: require with $_GET parameters"
- Reply: Paul Barfoot: "Re: require with $_GET parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]