Compare not working right

From: Date: Mon, 07 Aug 2000 22:26:55 +0000
Subject: Compare not working right
Groups: php.general 
Request: Send a blank email to php-general+get-10547@lists.php.net to get a copy of this message
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"; ?>

« previous php.general (#10547) next »