Re: die or exit not working

From: Date: Fri, 30 Jun 2000 20:54:01 +0000
Subject: Re: die or exit not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4140@lists.php.net to get a copy of this message
In article <Pine.LNX.4.10.10006211338380.30278-100000@localhost.localdomain>, kenn@pcintelligent.com (Ken N) wrote: > Hi, > > I am trying to use either die or exit but it doesn't seem to work, I know > the test is working however the call to die or exit fails to terminate the > script. any ideas? > > if(!system(escapeshellcmd("grep $newdomain /etc/apache/httpd.conf"))) > { > die("That entry exsits"); > } Try this: $domain = system(escapeshellcmd("grep $newdomain /etc/apache/httpd.conf")); if(!$domain) { die("That entry ($newdomain) exsits: $domain"); } else{ echo "Domain is $domain"; } Odds are really good you're not actually hitting the die() function in your code at all. -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#4140) next »