HELP

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

    HELP

    Hi,
    I am new to PHP and have found in many scripts on the net that people
    use @ as a prefix to inbuilt function.
    For e.g:


    $conn = @imap_open("\{$ server/pop3}INBOX", $user, $pass);
    i cant figure out this.Please help me understand this.

  • Erwin Moller

    #2
    Re: HELP

    Ashutosh wrote:
    [color=blue]
    > Hi,
    > I am new to PHP and have found in many scripts on the net that people
    > use @ as a prefix to inbuilt function.
    > For e.g:
    >
    >
    > $conn = @imap_open("\{$ server/pop3}INBOX", $user, $pass);
    > i cant figure out this.Please help me understand this.[/color]

    Hi

    The @ suppresses errors.
    SO in your case: if @imap_open("\{$ server/pop3}INBOX", $user, $pass); is not
    working for some reason, PHP will ignore it and NOT print an errormessage
    or warning.

    Regards,
    Erwin Moller

    Comment

    • Ronald Chaplin

      #3
      Re: HELP

      Ashutosh wrote:[color=blue]
      > Hi,
      > I am new to PHP and have found in many scripts on the net that people
      > use @ as a prefix to inbuilt function.
      > For e.g:
      >
      >
      > $conn = @imap_open("\{$ server/pop3}INBOX", $user, $pass);
      > i cant figure out this.Please help me understand this.
      >[/color]

      @ suppresses error and warning messages.

      --
      Ron Chaplin
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      T73 Software & Design

      To provide custom and quality
      software, designs and services,
      to our customers, at an affordable rate,
      with minimal delay.

      Comment

      • Ronald Chaplin

        #4
        Re: HELP

        Ronald Chaplin wrote:[color=blue]
        > Ashutosh wrote:
        >[color=green]
        >> Hi,
        >> I am new to PHP and have found in many scripts on the net that people
        >> use @ as a prefix to inbuilt function.
        >> For e.g:
        >>
        >>
        >> $conn = @imap_open("\{$ server/pop3}INBOX", $user, $pass);
        >> i cant figure out this.Please help me understand this.
        >>[/color]
        >
        > @ suppresses error and warning messages.
        >[/color]
        I should update my newsreader before replying I guess :p
        As this was just previously posted on

        --
        Ron Chaplin
        =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
        T73 Software & Design

        To provide custom and quality
        software, designs and services,
        to our customers, at an affordable rate,
        with minimal delay.

        Comment

        • Erwin Moller

          #5
          Re: HELP

          Ronald Chaplin wrote:
          [color=blue][color=green]
          >>[/color]
          > I should update my newsreader before replying I guess :p
          > As this was just previously posted on
          >[/color]

          :-)
          Happens to me too.
          Sometimes somebody posted a answers an hour before I answer, and I see it
          afterwards.
          Maybe something with relaying messages all over the world to newsservers?
          I don't know.

          At the bright side: If 2 people give the same suggestion/answer chances are
          the answer it is probably ok. :-)

          Regards,
          Erwin Moller

          Comment

          Working...