PHP函数和@functions [英] PHP functions and @functions
本文介绍了PHP函数和@functions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
基本上,我已经看到人们在调用函数之前使用@
,不是针对每个函数,而是针对诸如file_get_contents()
,mysql_connect()
之类的某种扩展功能.
Basically, I've seen people using @
before their function calls, not for every function, but for some kind of extension functions like file_get_contents()
, mysql_connect()
and so on.
是的,问题是:函数调用之前这些@
是出于什么目的?
And yes, the question is: For what purpose are there these @
s before function calls?
换句话说,@file_get_contents()
和file_get_contents()
有什么区别?
Or in other words, what is the difference between @file_get_contents()
and file_get_contents()
?
推荐答案
@是错误控制运算符.基本上是在抑制错误.
@ is an error control operator. Basically it's suppressing errors.
这篇关于PHP函数和@functions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文