At 22:24 04.04.2003, Mike Tuller said:
[snip]
>fine except inside functions. So if I have the following:
>
>include "/Library/WebServer/includes/database_connection.inc";
>
>function list_search_results()
>{
> // my code that lists search results
>}
>
>
PHP parses includes inline, so whatever the scope is where the file is
included, is the scope of the variables that the include contains. You can
declare the variables global in your fuction and it will use what was
included, that would be the quick fix, you could also switch your include to
use D
2 matches
Mail list logo