Re: Help With Includes
| From: | David Robley | Date: | Wed, 25 Jul 2001 01:02:36 +0000 |
| Subject: | Re: Help With Includes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59466@lists.php.net to get a copy of this message | ||
On Wed, 25 Jul 2001 10:26, John Holcomb wrote:
> Help please!
>
> I'm trying to use an include with my HTML file.
> Inside my HTML file I've tried:
>
> 1)
> <script language="php">
>
> include("/export/home/bayarea.net/htdocs/webclient.php3?id=2");
> </script>
>
> AND
>
> 2)
> <script language="php">
>
>
> include("http://www.bayarea.net/webclient.php3?id=2");
> </script>
>
>
> According to the PHP documentation #2 should work, but
> I keep getting an error saying that it's unable to
> include the file. #1 works when I leave off ?id=2,
> but I need to pass it a variable. Any help would be
> appreciated.
>
> Thanks,
>
> John
All include does is place the contents of the included file in your
current file (simplified explanation, but close enough).
If it is a local file you are including, just assign the value to the
variable and then include the file:
<script language="php">
$id = 2;
include("/export/home/bayarea.net/htdocs/webclient.php3");
</script>
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
Useless Invention: Inflatable darts-board.