|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-11-14 13:29 UTC] remi2402 at hotmail dot com
My script uses multiple includes and the file names all have the same syntax. So instead of writing each individual include, I created an array which contains all the filenames
function LoadSections($sections)
{
foreach ($sections as $key => $value)
{
include "mod.section." . $value . ".php";
}
}
All the files load well except that I cannot access HTTP_GET_VARS and the isset() function always return false.
NB My includes work fine when loaded individually
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 14:00:01 2025 UTC |
Your example is including files inside a function so the included files follow standard variable scope rules. This is why this is marked as a bogus bug and a support question. function foo() { $var = 'blah'; } foo(); var_dump($var); // NULL $_GET will still be available as it's an autoglobal while $HTTP_GET_VARS will not.