I would roll through the globals checking if your exclusion variables are there and creating a temp. array, and after that replace $GLOBALS with the temp.
PHP Code:
function exclude_globals($exclude = NULL){
//default exclusions
$default_excludes = array("_POST","_GET");
//roll through $GLOBALS
$GLOBALS_temp=array();
foreach($GLOBALS as $GLOBALS_name=>$GLOBALS_content){
//check if vars are in global
if (!(in_array($GLOBALS_name,$exclude) || in_array($GLOBALS_name,$default_excludes)) ){
//assign to temp array
$GLOBALS_temp[$GLOBALS_name]=$GLOBALS_content;
}
//replace globals with temp array
$GLOBALS = $GLOBALS_temp;
}
}
//call the function
exclude_globals(array("_FILES"));
//dump GLOBALS
echo("<h2>glob</h2>");
echo("<pre>");
print_r($GLOBALS);
echo("</pre>");
That takes away those variables from $GLOBALS but I'm not sure if that's exactly what you want 
__________________
Hades,
Ancient god, King of the Nether World, and Guardian of the Dead.
...and on my free time I'm also a web developer, contact me if you need one!
|