Easy Question: What does "@" mean?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Derek Wickersham

    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_d b( "scripts");




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

    #2
    Re: Easy Question: What does "@&quot ; mean?

    dwnospam@mtco.c om (Derek Wickersham) wrote in
    news:cc8d2f69.0 410251023.539e9 1b6@posting.goo gle.com:
    [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_d b( "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.

    Comment

    • Coder Droid

      #3
      Re: Easy Question: What does "@&quot ; 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


      Comment

      • 2metre

        #4
        Re: Easy Question: What does "@&quot ; 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.

        Comment

        • Theo

          #5
          Re: Easy Question: What does "@&quot ; mean?

          2metre <2metre@xxxhers ham.net> wrote in news:clku0n$k7e $1
          @hercules.btint ernet.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.

          Comment

          Working...