Re: include using http method
| From: | Julian Wood | Date: | Fri, 20 Oct 2000 17:43:29 +0000 |
| Subject: | Re: include using http method | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21446@lists.php.net to get a copy of this message | ||
on 10/20/00 11:11 AM, Hardy Merrill at merrill@missioncriticallinux.com
wrote:
>
> I'm trying to use the "http" variation of "include", so that
> I can pass a parameter to the .php file being included. I've
> followed the docs but can't get this to work.
>
You don't need to use the 'http' variation of include to pass a parameter to
an included file. The included file falls within the scope of the parent
file, so it has access to any global variables you define in the parent
file.
eg.
file 1:
-------
<?php
$test="hello";
include('header.php')
?>
header.php
----------
<?php echo $test; ?>
HTH,
Julian
--
Julian Wood
Learning Technologies and Digital Media
University of Calgary