$value) { $$name = $value['tmp_name']; ${$name . '_name'} = $value['name']; } unset($name, $value); } /** * globalize some environment variables */ $server_vars = array('PHP_SELF', 'HTTP_ACCEPT_LANGUAGE', 'HTTP_AUTHORIZATION'); foreach ($server_vars as $current) { // its not important HOW we detect html tags // its more important to prevent XSS // so its not important if we result in an invalid string, // its even better than a XSS capable string if (getenv($current) && false === strpos(getenv($current), '<')) { $$current = getenv($current); // already importet by register_globals? } elseif (! isset($$current) || false !== strpos($$current, '<')) { $$current = ''; } } unset($server_vars, $current, $_import_blacklist); ?>