RE: [PHP] parsing ini files

From: Date: Wed, 15 Oct 2003 12:01:00 +0000
Subject: RE: [PHP] parsing ini files
Groups: php.general 
Request: Send a blank email to php-general+get-166197@lists.php.net to get a copy of this message
[snip] Correct. The error I'm getting it's because the ini file is not properly formed. But I want to catch somehow this error and tell the user that he made a mistake in the ini file. I'm not edititng that file programmatically, I just want the user who made that mistake to see a more frendly error message. Any ideas on how to do that? [/snip] This is not tested, but I suppose you could use "or die()" parse_ini_file("foo.ini") or die ("The configuration file has an error\n"); or an if statement if(!(parse_ini_file("foo.ini"))){ echo "The configuration file has an error\n"; } HTH

« previous php.general (#166197) next »