Trium918 Posted April 15, 2007 Share Posted April 15, 2007 Could someone please explain to me what do the symbol @ does in the script below? 1.) What is the name of this symbol? 2.) What does it do? 3.) When to use it? <?php function db_connect() { $result = @mysql_pconnect("localhost", "content", "password"); if (!$result) return false; if (!@mysql_select_db("content")) return false; return $result; } ?> Link to comment https://forums.phpfreaks.com/topic/47153-what-is-this-symbol/ Share on other sites More sharing options...
Voldemort Posted April 15, 2007 Share Posted April 15, 2007 The @ tells the program to ignore any errors. Example: <?php // "index2.htm" doesn't exist include("index2.htm"); // will produce an error @include("index2.htm"); // will just ignore it if it doesn't find it ?> Link to comment https://forums.phpfreaks.com/topic/47153-what-is-this-symbol/#findComment-229951 Share on other sites More sharing options...
Trium918 Posted April 15, 2007 Author Share Posted April 15, 2007 Ok thanks, and the name of the symbol. Link to comment https://forums.phpfreaks.com/topic/47153-what-is-this-symbol/#findComment-229958 Share on other sites More sharing options...
AndyB Posted April 15, 2007 Share Posted April 15, 2007 It's name? Good question - here's the answer: http://www.askoxford.com/asktheexperts/faq/aboutsymbols/atsign?view=uk Link to comment https://forums.phpfreaks.com/topic/47153-what-is-this-symbol/#findComment-229959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.