Hi, Friday, April 30, 2004, 1:29:12 AM, you wrote: RW> [...] >> <? >> function safeInclude($file) { RW> [...]
RW> foreach ( $GLOBALS AS $k => $v ) { RW> $$k = $v ; RW> } RW> [...] >> if(file_exists($file)) { >> include($file); >> } else { >> debug("file $file not found"); >> } >> } >> ?> RW> [...] RW> (better, as no eval-syntax is required) RW> -- red That makes local copies only, still no access to the global variable The other thing to consider is that everything dies at the conclusion of the function. It may be better to do this via a class construct -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php