[m-rev.] for review: deep profiling on the web page

Tyson Dowd trd at cs.mu.OZ.AU
Thu Aug 2 18:39:36 AEST 2001


I would put good money on you needing to declare the variable as global.

PHP has this nutty idea that if you want to access a global variable you
have to declare it locally as a global variable.  Otherwise it is
considered a new local variable and will be the empty string.

I would guess that more then 50% of the bugs in PHP3 scripts can be
attributed to this "design" decision.

On 02-Aug-2001, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 01-Aug-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > You will just need to hard code the path explicitly, or alternatively
> > you could add a new file w3/include/globals.inc which contains:
> > 
> > <?
> > 	$installed_path=/home/mercury5/installed_w3
> > ?>
> > 
> > And include this file from w3/include/template.inc
> > 
> > You could then use this variable whenever you need it.
> 
> I tried your second approach first, but it did not work. Since I don't have a
> php3 manual, and my tolerance for voodoo programming is low, I gave up after
> trying a couple of obvious variations. I have hardwired the pathname for now.
> If you have time, you could change things to use your second approach after
> I commit my change.
> --------------------------------------------------------------------------
> mercury-reviews mailing list
> post:  mercury-reviews at cs.mu.oz.au
> administrative address: owner-mercury-reviews at cs.mu.oz.au
> unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
> subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
> --------------------------------------------------------------------------
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list