Suppressing PHP Errors & Warnings Using @
One part of making sure your website is secure in its hosting environment is to handle errors in a good fashion. If you don't have complete control of your hosting environment, you don't know what you can expect in the way of error handling if you don't do everything you can think of.
One method I use in all of my programming is to place an '@' character in front of function calls that have potential for returning warnings or errors.
@require($_SITE['ROOT'].$_FOLDERS['CONTROL'].'logger.php'); // suppress a file not found error
@mysql_connect($host,$user,$pass); // suppress no connection error
I recommend using the @ once your website is in production. I generally don't use the @ on development servers because I want to be aware of errors during development.
Hey everyone! Before we get started, I just want to say it's damn hard to pick this few favorites on CodePen. Not because, as a co-founder of CodePen, I feel like a dad picking which kid he likes best (RUDE). But because there is just so...
This is the hardest thing I've ever had to write, much less admit to myself. I've written resignation letters from jobs I've loved, I've ended relationships, I've failed at a host of tasks, and let myself down in my life. All of those feelings were very...
Remember the old days of DHTML and effects that were an achievement to create but had absolutely no value? Well, a trailing mouse cursor script is sorta like that. And I'm sorta the type of guy that creates effects just because I can.
This post is a proof of concept post -- the functionality is yet to be perfected.
Picture this: you've found yourself on a website that uses horizontal scrolling instead of vertical scrolling. It's an artistic site so you accept that the site scrolls left to right.