Re: Things to check before you post (The Ultimate PHP Checlist)

From: Date: Thu, 27 Jul 2000 17:19:45 +0000
Subject: Re: Things to check before you post (The Ultimate PHP Checlist)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-8596@lists.php.net to get a copy of this message
In all my code, I use the following At the beginning of all files, functions, etc $Debug = true; # false if I'm feeling lucky.. Scattered around, and at entry and exit points. if ($Debug) {echo ("Very useful message , or the value of something important =".$Something_important."<BR>");} Litter the code with debug messages, it's SO helpful when something goes wierd. Later, I may get a little more specific, and do something like this: if ($REMOTE_ADDR == "my.ip.adr.here") {$Debug = true;} else {$Debug = false;} to avoid having to turn it on and off. Pity that variables like $REMOTE_ADDR aren't global. What ELSE would you do with that name? -- www.SpamWhack.com A pre-emptive strike against spam Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 My transistor sings with unintended parasitic the smoke escapes By Jeff Stout

« previous php.general (#8596) next »