Re: Compare not working right - FIXED

From: Date: Mon, 07 Aug 2000 22:49:20 +0000
Subject: Re: Compare not working right - FIXED
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10549@lists.php.net to get a copy of this message
Never mind folks. Fixed it. It was the return at the end of the program line throwing everything off. A little chop() fixed it. CDitty At 05:26 PM 08/07/2000 , CDitty wrote:
Can someone look at this code and see why it is not comparing correctly? It is taking a known valid string and comparing it to the output from the mysql server. Anyone? CDitty <? // Script to test and see if the mySQL server is active. // If it is not active, then send an email to admin $varExpected = "/usr/home/funhouse/usr/local/bin/mysql Ver 9.38 Distrib 3.22.32, for unknown-freebsdelf3.3 (i386)"; $varMySQLexe = "/usr/home/funhouse/usr/local/bin"; $varEmailTech = "webmaster@funhouselotto.com"; $var_rcRestart = "sh ~/etc/rc"; $varFound = $varMySQLexe/mysql -V; $varDate = date("m-d-y H:i a"); print"$varMySQLexe/mysql -V<br>"; print"$varDate<br>"; print"<pre>$varExpected<br>"; print"$varFound<br><br></pre>"; if($varExpected != $varFound) {
        print"Hi<br><br><br>";
} //print"$varExpected\n<br>"; //print"$varFound"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#10549) next »