09-24-2005, 11:42 PM
I know this is an idiot question, but what does "@" do?
I've never really been sure, and it just occured to me to ask.
Thanks for tolerating the idiot! :D
09-25-2005, 12:06 AM
Puttin @ in front of something surpresses any errors that occur from using it... So say you wanted to connect to MySQL, but if the connection fails you dont want any kind of warning, you could use:
@mysql_connect('...', '...', '...');
It is useful for live use and functions where you manually check for errors, but NEVER get into the habbit of using this when developing code.
09-25-2005, 07:36 AM
I use this when developing code ONLY when I have custom errors to take the place of the default one. I like to do this because I don't like the ugly errors that PHP outputs, and to do this, I have to put @ in front of the functions that can output errors (the default ones, I am not sure that it works for user-made functions...).