[PHP] included file var scope

2008-04-07 Thread Evert Lammerts
Hi all, My system is accessible through an index.php file. This file does a bunch of includes to include global variables, which in function context become available through the global keyword: index.php ?php require_once global_vars.php; function f() { global $global_var;

Re: [PHP] Search engines and cookies

2008-04-07 Thread Evert Lammerts
Search engines won't come past that page. How about setting a default region when a user enters a different page then your main page? Daniel Brown wrote: On Mon, Apr 7, 2008 at 9:29 AM, Emil Edeholt [EMAIL PROTECTED] wrote: Hi, Do you guys how search engines like cookies? One site I'm

Re: [PHP] included file var scope

2008-04-07 Thread Evert Lammerts
In index.php rather than declaring vars like so... $var = 'value'; ...declare them in the $GLOBALS array like so... $GLOBALS['var'] = 'value'; $var is then in the global scope regardless of where it was set. -Stut That would work. However I'm looking for a more generic solution,

Re: [PHP] included file var scope

2008-04-07 Thread Evert Lammerts
I'm not sure what you mean. If you're saying you want to include a file from inside a function but for all parts of it to behave as if it were being included at the global scope then I don't believe there's a way to do it. Maybe it would be better if you tell us exactly what you're trying