What is the difference between @mysql_connect and mysql_connect in php

 Shield error

If there is an error, all the sentences will be displayed.
Adding @ does not display
$link=@mysql_connect('localhost','root','123') or die ("Database connection failed");

It’s best to write like this.
If it fails (or die), it will display "Database Connection Failed"

Guess you like

Origin blog.csdn.net/liuyuinsdu/article/details/113878807