WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Topic started by: anchorageweather on February 25, 2008, 09:19:17 PM
-
I seem to remember some code that can be added to a php file that will hide errors. Can someone help me remember? Thanks!!!!
-
If you just want to hide Notice: type errors, the
<?php error_reporting(E_ALL ^ E_NOTICE); ?>
does the trick.
It's best to try and fix the Notice: errors though :-)
You can't 'hide' Error: or Warning: messages since they usually cause the script to malfunction.
Best regards,
Ken
-
If you just want to hide Notice: type errors, the <?php error_reporting(E_ALL ^ E_NOTICE); ?>
does the trick.
It's best to try and fix the Notice: errors though :-)
You can't 'hide' Error: or Warning: messages since they usually cause the script to malfunction.
Best regards,
Ken
Ken:
Thanks! I was going to add the code for Caterlake's severe advisory program. Sometimes (more often lately) the NWS in my area has trouble with their site. The script can't call the info, and the result trashes my whole site. I was hoping to have the rest of the page load without the severe weather info. Unfortunately, I don't know enough php to do much else :oops:
-
You might try updating the Carterlake severe advisory program to the newer rss-top-warning.php (and the advisory script to rss-advisory.php) Both scripts incorporate 'soft failure' when there's a problem with the NOAA RSS feed (thanks to MCHALLIS and JMCMURRY for the script updates).
http://saratoga-weather.org/scripts-rss.php#topwarn
http://saratoga-weather.org/scripts-rss.php#NOAARSS
Best regards,
Ken