why use @before variable. can someone pls explain

Possible Duplicate:
What is the use of @ symbol in php?
Reference - What does this symbol mean in PHP?

what does using <?php echo @$fnameerror; ?> <?php echo @$fnameerror; ?> mean. why use @ before variable in php


错误控制运算符..抑制错误消息..


@ is pure evil. It's not a good idea to use. You can find an explanation about it here.

It can cause massive debugging headaches because it will even suppress critical errors.


The only reason I can think of to use the error suppression operator before a variable would be to suppress E_NOTICE errors if the variable is undefined.

As others have mentioned, this is a bad idea. It's much better to actually deal with errors than ignore them.

链接地址: http://www.djcxy.com/p/10212.html

上一篇: 问号冒号操作符的含义

下一篇: 为什么要使用@before变量。 有人可以解释