Re: [PHP] Re: global vars inside includes inside functions?

2004-04-29 Thread Red Wingate
Pattern are always done using OOP, but phppatterns that is one of the best sources on this topic i could think of :-) -- red [] > Red, can you provide any more info or resources on a "registry-pattern"? > > I've found this: > http://www.phppatterns.com/index.php/article/articleview/75/1/1/ ,

Re: [PHP] Re: global vars inside includes inside functions?

2004-04-29 Thread Red Wingate
Again ain't no problem anyway foreach ( $GLOBALS AS $k => $v ) { $$k =& $GLOBALS[$k] ; } zap you are done ... again when using a function to include a file with relying on depts within the file you would most probably use a registry-pattern or similar to access the required variables. -- red

Re: [PHP] Re: global vars inside includes inside functions?

2004-04-29 Thread Tom Rogers
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

[PHP] Re: Global vars or Environment var on Class

2004-02-17 Thread Vivian Steller
Turbo wrote: > Hi > > I cann't call Global vars or Environment var on Class.How to's i do to > call it? > I want to call variable same below. > > var $location > ="http://".$HTTP_SERVER_VARS['HTTP_HOST'].$_SERVER['REQUEST_URI']."?" $HTTP_SERVER_VARS['QUERY_STRING']; > > > Thank you. > Turb

[PHP] Re: Global Vars

2002-09-18 Thread David Eggler
In article <004b01c25f36$961fbbd0$6200a8c0@squitta>, [EMAIL PROTECTED] (Sascha Braun) wrote: > But how can i make definitions like method="post"> Those variables can be accesd via the global $_POST['varname'] > working without usage of hidden fields. > > Or links like test.php?action=update

[PHP] Re: global vars in a function

2002-03-29 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Justin French) wrote: > Am I missing something? I'm trying to use vars set in my config.php file in > a function, and can't seem to do it without using $GLOBALS["varname"] > Is there a way to make global vars available in each function, or is