note 10258 added to Comments

From: Date: Thu, 21 Dec 2000 14:42:10 +0000
Subject: note 10258 added to Comments
Groups: php.notes 
Request: Send a blank email to php-notes+get-8989@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. http://www.php.net/manual/language.basic-syntax.comments.php

« previous php.notes (#8989) next »