ScottInTexas
02-27-2003, 07:16 PM
I notice some cases where the author hass put @fopen() or @mysql_select_db. What is the @ for? I tried to look it up in the php manual at php.net but I can't find a reference.
|
||||
@ with function names?ScottInTexas 02-27-2003, 07:16 PM I notice some cases where the author hass put @fopen() or @mysql_select_db. What is the @ for? I tried to look it up in the php manual at php.net but I can't find a reference. Nightfire 02-27-2003, 07:32 PM It surpresses(sp?) the error if there is one ScottInTexas 02-27-2003, 07:42 PM Thanks:) wert 02-27-2003, 11:19 PM What you mean is that @mysql_connect() it ignores if there is an error during DB Conection and so...? sory but I'm a noob Spookster 02-27-2003, 11:38 PM Yes. By placing the @ symbol in front of a function name, it supresses any errors that might be generated by that function. It is common to use that in conjunction with displaying a customized error message to the user. For example: @mysql_connect() or die("The database is currently down. Please try again later"); or @my_function() or die("My function is lazy and incompetent so come back some other time"); |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum