Connecting Tech Pros Worldwide Help | Site Map

Easy Question: What does "@" mean?

Derek Wickersham
Guest
 
Posts: n/a
#1: Jul 17 '05
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.)
Theo
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Easy Question: What does "@" mean?


dwnospam@mtco.com (Derek Wickersham) wrote in
news:cc8d2f69.0410251023.539e91b6@posting.google.c om:
[color=blue]
> 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.)
>[/color]

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

re: Easy Question: What does "@" mean?


> prevents errors being printed to the screen. good for developing, bad[color=blue]
> whenyour site is done, online, and all the world can see it.[/color]

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


2metre
Guest
 
Posts: n/a
#4: Jul 17 '05

re: Easy Question: What does "@" mean?


Coder Droid wrote:[color=blue][color=green]
>>prevents errors being printed to the screen. good for developing, bad
>>whenyour site is done, online, and all the world can see it.[/color]
>
>
> 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.[/color]
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.
Theo
Guest
 
Posts: n/a
#5: Jul 17 '05

re: Easy Question: What does "@" mean?


2metre <2metre@xxxhersham.net> wrote in news:clku0n$k7e$1
@hercules.btinternet.com:
[color=blue]
> Coder Droid wrote:[color=green][color=darkred]
>>>prevents errors being printed to the screen. good for developing, bad
>>>whenyour site is done, online, and all the world can see it.[/color]
>>
>>
>> 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.[/color]
> BTW I think you misunderstood him! I think his good/bad were refering[/color]
to[color=blue]
> 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.
>[/color]

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.
Closed Thread