Posted by Oli Filth on 01/20/06 00:18
J said the following on 19/01/2006 21:58:
> I have a page search.php which uses Top.php and Bottom.php to do most
> webpage stuff common to all pages. Top.php includes/requires
> KTConstants.php.
> Top.php can't see Constants/variables like $favoriateColor='234566'; defined
> in KTConstants.php
> I tried include instead of require.
> I tried using $GLOBALS['KTPTBlue']; perhaps I didn't do it right.
> The global keyword gives me an error...expected = or something.
>
>
<SNIP CODE>
See Example 12-2 at
http://www.php.net/manual/en/language.variables.scope.php. Note where
the "global" keyword is used.
--
Oli
Navigation:
[Reply to this message]
|