note 10258 deleted from language.basic-syntax.comments by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 22:26:59 +0000 |
| Subject: | note 10258 deleted from language.basic-syntax.comments by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22306@lists.php.net to get a copy of this message | ||
why using comments to allow or deny Debug-Code.
Better is to define a standard include file e.g.
"standard.inc"
In this file you set a variable $debug
and some applicationspecific settings for databaseconnections or
things like that.
in our code you can check the $debug variable with something like this:
if($debug==1){
//here comes your debug output
}
For me this works fine. An advantage is, that you never have
to uncomment your whole source over and over, but simply set
$debug to 1 or 0 in one File.