Re: BUG: require_once() or die(); = fatal error

From: Date: Sat, 29 Nov 2003 03:57:53 +0000
Subject: Re: BUG: require_once() or die(); = fatal error
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-171318@lists.php.net to get a copy of this message
* Thus wrote Daevid Vincent (daevid@daevid.com): > My way, the logic is that the file *is* 'required' (whereas I view > 'include' > files as optional), and I want to exit the program with a graceful message > instead of the fatal error (which doesn't really doesn't tell me what the > problem is -- "Failed opening required '1'" doesn't mean anything to > me or > the user) that is shown. My intent was to put a @require_once() so that I > could do just that. Especially since I'm running my script on the command > line, and your stock fatal error message uses HTML tags. Remove your 'or die()' and the message "required opening required '1'" will show up properly. About the html errors: 1. Use the php parameter -dhtml_errors=off 2. create a php-cli.ini in the location were php reads current php.ini 3. Use the -c parameter to tell php to use a different ini file to read. > > Not a critical bug or a show stopper, but I do still feel it is a bug. If your car does'nt float in the water is it the manufacturer's fault? Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/

« previous php.general (#171318) next »