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/ ,
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
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
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
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
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
6 matches
Mail list logo