469,607 Members | 2,154 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,607 developers. It's quick & easy.

Easy Question: What does "@" mean?

Easy newbie question. I've searched all the PHP documentation I can
find, but can't find an answer.

What does the "@" mean, in this context:

@mysql_select_db( "scripts");


(Have you ever tried Googling for the @ symbol? Doesn't work.)
Jul 17 '05 #1
4 1729
dw******@mtco.com (Derek Wickersham) wrote in
news:cc**************************@posting.google.c om:
Easy newbie question. I've searched all the PHP documentation I can
find, but can't find an answer.

What does the "@" mean, in this context:

@mysql_select_db( "scripts");


(Have you ever tried Googling for the @ symbol? Doesn't work.)


prevents errors being printed to the screen. good for developing, bad
whenyour site is done, online, and all the world can see it.
Jul 17 '05 #2
> prevents errors being printed to the screen. good for developing, bad
whenyour site is done, online, and all the world can see it.


Well, not necessarily. If the errors reveal something about your web
server, database, or whatever, that you might not want the whole world
to see.

With that said, using error_reporting and/or the display_errors
directive are a better way to handle this: since that let's you set the
option globally, instead of sprinkling your code with random @
characters.

--cd
Jul 17 '05 #3
Coder Droid wrote:
prevents errors being printed to the screen. good for developing, bad
whenyour site is done, online, and all the world can see it.

Well, not necessarily. If the errors reveal something about your web
server, database, or whatever, that you might not want the whole world
to see.

BTW I think you misunderstood him! I think his good/bad were refering to
the "errors being printed on screen", not the prevention of them!

I agree having a global control is better for when you switch from
development to production.
Jul 17 '05 #4
2metre <2m****@xxxhersham.net> wrote in news:clku0n$k7e$1
@hercules.btinternet.com:
Coder Droid wrote:
prevents errors being printed to the screen. good for developing, bad
whenyour site is done, online, and all the world can see it.

Well, not necessarily. If the errors reveal something about your web
server, database, or whatever, that you might not want the whole world
to see.

BTW I think you misunderstood him! I think his good/bad were refering

to the "errors being printed on screen", not the prevention of them!

I agree having a global control is better for when you switch from
development to production.


I didnt think about control in that fashion, but I will be trying that
soon. :o)

Yes I did mean that its bad for such errors to be printed to the screen
on sites that are available for anyone to browse. When I do a google
search for new errors I get in the logs or on screen, its interesting to
see how many hits are not discussions of what the errors are, but non-
functional pages where the errors are happening for whatever reason. And
this goes for personal and semi-professional or education sites. But Ive
never seen a google hit a big time site.
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

33 posts views Thread by Jim Hill | last post: by
1 post views Thread by David Furey | last post: by
1 post views Thread by Anurag | last post: by
409 posts views Thread by jacob navia | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.