Forum Moderators: coopster

Message Too Old, No Replies

PHP mail function

What is the @ for?

         

ffoeg

1:14 pm on Aug 29, 2006 (gmt 0)

10+ Year Member



I've tried using the mail function in PHP numerous times, sometimes it works, sometimes it doesn't.

But I've always seen two different ways of using the function. One of them looks like this:

mail()

whereas the other one looks like this:

@mail()

Back to my original question; what is the

@
sign for, and is it significant?

eelixduppy

1:22 pm on Aug 29, 2006 (gmt 0)



Take a look at Error Control Operators [us3.php.net]. This will contain the answer you are looing for.

Good luck!

ffoeg

10:21 pm on Aug 29, 2006 (gmt 0)

10+ Year Member



Aaah, thanks for the link. It helps me a lot.

Quite a handy feature, I must admit!

jatar_k

4:26 pm on Aug 30, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it is, but remember it is there when you are trying to debug ;)

I also don't rally like using it, errors and exceptions should be gracefully handled, not suppressed