在php.ini中修改这两项设置:
; - display_errors = Off           [Security]
;     With this directive set to off, errors that occur during the execution of
;     scripts will no longer be displayed as a part of the script output, and thus,
;     will no longer be exposed to remote users.  With some errors, the error message
;     content may expose information about your script, web server, or database
;     server that may be exploitable for hacking.  Production sites should have this
;     directive set to off.
; - log_errors = On                [Security]
;     This directive complements the above one.  Any errors that occur during the
;     execution of your script will be logged (typically, to your server's error log,
;     but can be configured in several ways).  Along with setting display_errors to off,
;     this setup gives you the ability to fully understand what may have gone wrong,
;     without exposing any sensitive information to remote users.

解决方案 »

  1.   

    然后ALL错误信息都不会显示,排错就有点麻烦了,要得去查看log文件.用21bird的方法也可以,@就是压制错误,不过你不可能个个函数都用@吧?
      

  2.   

    display_errors = off这是高版本php默认设置,当时不知道怎么改,
    现在也懒得改,调试程序好累……呵呵。
    幸亏我作的系统不大:)
      

  3.   

    呵呵.高版本的PHP默认也不是这个.关键看你是选了哪个php.ini,如果是php.ini-dist,就只有register_globals=Off,如果是选php.ini-recomm什么的,就是一堆设置被改过的.