0

Possible Duplicate:
Reference - What does this symbol mean in PHP?

Found an image upload script on the net and I'm just modifying it to my needs. It contains lines like the one below that begins with an @ symbol. I'm more of a javascript/jQuery guy so can someone explain what this '@' syntax is all about please?

@move_uploaded_file($_FILES[$fieldname]['tmp_name'], $uploadFilename)
    or error('receiving directory insuffiecient permission', $uploadForm);

Please note I'm not asking what the above lines do, just about the functionality of the @ symbol

Community
  • 1
  • 1
RyanJP
  • 277
  • 1
  • 3
  • 15
  • 1
    Please search first... or just read the manual. This has been asked many, many times. – Lightness Races in Orbit Feb 26 '12 at 03:15
  • I am afraid you don't actually know what this code do. This is a perfect example of the typical product of typical PHP user, who never have an idea what is he doing. Error handling is confused with error reporting here. Poor creature just didn't know how to handle error reporting site-wide, so, he used @ only for this line. Making debugging impossible. And - most funny part - he believes that "insufficient permission" is the only possible error here. – Your Common Sense Feb 26 '12 at 03:49
  • it was just a simple tutorial dude, chill – RyanJP Feb 27 '12 at 04:12

2 Answers2

3

It stops error messages, see here: http://us3.php.net/manual/en/language.operators.errorcontrol.php

Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
0

It suppresses PHP errors, generally it'll be used by lazy developers as a substitute to isset()

Stoosh
  • 2,408
  • 2
  • 18
  • 24