i see '@' being used sometimes.
when and why should i use it?
xamp:
"if(!$dh = @opendir($dir)) return;"
what is @?
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- WaldoMonster
- Forum Contributor
- Posts: 225
- Joined: Mon Apr 19, 2004 6:19 pm
- Contact:
I use it to make custom error messages.
Here is an example where message is a function that displays the error message:
Here is an example where message is a function that displays the error message:
Code: Select all
$handle = @opendir($dir) or message(__FILE__, __LINE__, 'error', '<strong>Can\'t open directory:</strong><br>' . htmlentities($dir) . '<ul class="compact"><li>Check media_dir value in config.inc.php</li><li>Check file/directory permission</li></ul>');