Forum Moderators: coopster

Message Too Old, No Replies

Disabling a Code function

there is a code but wanna disable its function

         

websoft

8:22 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



there is a code on a php file, i wanna use a code before it to disable the code e.g. from if ( ) till another } - i wanna disable it without removing it. i really need this help thanks all u

MatthewHSE

8:34 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you just comment it out?

/* Begin PHP comment
if () {
}
End PHP comment */

janharders

8:36 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yeah, commenting it out would be the cleanest way. if that is out of the question for some reason, modify the if( )
instead of
if(something)
say
if(false && something)

which will never be true.

websoft

8:38 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



it's decoded comment it ?

websoft

8:59 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



if ( trim($mta_cbid) != '' ) {
}
between {} there is the code i wanna disable

websoft

9:02 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



commenting completely disable the script function

MatthewHSE

10:46 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



commenting completely disable the script function
You must have commented out the wrong code. Just put the comment tags around the code you want to disable, e.g.,

if (trim($mta_cbid) != ") {
$keep = '123';
/* Begin comment
$disable = '456';
End comment */
$AndAlsoKeep = '789';
}