I am having trouble figuring out some variable scoping.
I have an include file, and I want to be able to access a variable in this include file that I define just before I include the file.
For example, the include looks like:
<?php
$headerExclude = "Main";
include("header.php");
?>
This happens to work just fine. The variable headerExclude is available within the include file. However if, I do this:
<?php
$headerExclude = "Main";
include("http://www.whateversite.com/header.php");
?>
The variable headerExclude is not available.
I have also tried to just get the URL just inside the file header.php, but it always returns the URL of header.php and not the file that is including header.php. If anyone knows how to get the calling URL from within header.php, I may be able to solve my problems with that as well.
Thanks
Mona