By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,713 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,713 IT Pros & Developers. It's quick & easy.

Easy Question: What does "@" mean?

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
> 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

P: n/a
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

P: n/a
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.