tocilog Posted July 7, 2018 Share Posted July 7, 2018 I'm comparing the two Scripts 12.1 and 12.2 and notice line 12 if ($dbc = mysqli_connect('localhost', 'username', 'password', 'myblog')) { // Script 12.1 if ($dbc = @mysqli_connect('localhost', 'username', 'password', 'myblog')) { // Script 12.2 What is the use of the '@'? What is the difference between with and without '@' on @mysqli_connect() and when to use the '@'? Link to comment Share on other sites More sharing options...
Larry Posted July 11, 2018 Share Posted July 11, 2018 The @ is the error suppression operator. It's a blunt tool to stop errors from being displayed, but you'll generally only want to use it when the errors are still being handled in some way. Link to comment Share on other sites More sharing options...
Recommended Posts