how to php error handling...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • openxmod
    New Member
    • Sep 2008
    • 1

    how to php error handling...

    hi,
    i am using WAMP in localhost...
    can anyone help about how to handle PHP error?
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    That depends... what is the error?
    It would also help to see the portion of your code that is generating the error.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      You handle PHP errors by fixing them.

      :P

      Also, as a note, you can use the '@' sign to surpress errors you know won't affect the rest of the program.

      Comment

      • bnashenas1984
        Contributor
        • Sep 2007
        • 257

        #4
        Hi
        If you want to hide any error messages shown by php put this line on top of your code
        Code:
        ini_set("display_errors","0");
        or if you have access to PHP.INI then change the value of "display_errors " to OFF

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          Originally posted by bnashenas1984
          Hi
          If you want to hide any error messages shown by php put this line on top of your code
          Code:
          ini_set("display_errors","0");
          or if you have access to PHP.INI then change the value of "display_errors " to OFF
          Not a very responsible thing to do, IMHO.

          Comment

          • pbmods
            Recognized Expert Expert
            • Apr 2007
            • 5821

            #6
            Heya, OpenXMod.

            Check out this article.

            Comment

            Working...