NYCPHP Meetup

require/include inside a function

Hans Zaunere zaunere at yahoo.com
Mon Jun 10 22:18:08 EDT 2002


I'm using the unserialize_callback_func ini setting, from
http://www.php.net/manual/en/function.unserialize.php like so:

ini_set('unserialize_callback_func','handlestdclass');

function handlestdclass( $classname ) {
   require_once("{$classname}/{$classname}.inc");
}

Now I may be overlooking something very obvious, but when code is
require/included in a function, it is locally scoped inside that
function.  If that's the case, and no way around it, what good is this
directive?

Any thoughts would be helpful.  Thanks guys,

Hans Z

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com



More information about the talk mailing list