Bạn có thể nhận tất cả cảnh báo và lỗi trong khi bỏ qua thông báo u hát này:
error_reporting(E_ALL & ~E_NOTICE & ~E_USER_NOTICE);
Cờ báo cáo lỗi bit cấp là:
Error Bit Purpose
###############################################################################
E_ALL All errors and warnings (doesn't include E_STRICT)
###############################################################################
E_ERROR Fatal run-time errors
###############################################################################
E_WARNING Run-time warnings (non-fatal errors)
###############################################################################
E_PARSE Compile-time parse errors
###############################################################################
E_NOTICE Run-time notices (these are warnings which often result
from a bug in your code, but it's possible that it was
intentional (e.g., using an uninitialized variable and
relying on the fact it's automatically initialized to
an empty string)
###############################################################################
E_STRICT Run-time notices, enable to have PHP suggest changes to
your code which will ensure the best interoperability
and forward compatibility of your code.
###############################################################################
E_CORE_ERROR Fatal errors that occur during PHP's initial startup
###############################################################################
E_CORE_WARNING Warnings (non-fatal errors) that occur during PHP's
initial startup
###############################################################################
E_COMPILE_ERROR Fatal compile-time errors
###############################################################################
E_COMPILE_WARNING Compile-time warnings (non-fatal errors)
###############################################################################
E_USER_ERROR User-generated error message
###############################################################################
E_USER_WARNING User-generated warning message
###############################################################################
E_USER_NOTICE User-generated notice message
###############################################################################
Bạn cũng có thể thiết lập ignore_repeated_errors
TRUE/1 để nó không làm ngập đăng nhập của bạn là tốt.
ini_set('ignore_repeated_errors',1);
Nguồn
2012-03-19 07:47:37
Nó không thực sự là một "giả" tin nhắn, chỉ cần một trong những bạn muốn cố tình lờ đi. Nếu không ai có thể đưa ra một thiết lập ini để ngăn chặn thông báo cụ thể này, có lẽ điều duy nhất bạn có thể làm là tạm thời ghi đè lên trình xử lý lỗi, chuỗi phù hợp với lỗi cụ thể này và thả nó. – deceze
Vâng, tôi cho rằng điều tương tự có thể được nói nếu nó nhổ ra một tin nhắn mỗi khi tôi chia 3 cho 2. Tôi sẽ chọn để "cố ý bỏ qua" rằng một, quá. AFAICT, thông báo bỏ qua trình xử lý lỗi. (Vì nguồn của nó là “Không xác định”?) – danorton