error_log
������� ��������� �� ������.
��������� :
int error_log(string message, int message_type [, string destination [, string extra_headers]])
���������, ���������� ���� ��������, ����� ���� ���������� � ������ ��������� ��������� web-�������, ���� TCP ��� � ����.
� ������ ��������� message ����������� ���� ���������� ���������. �� ������ ��������� message_type - ���� ��� ������ ���� ����������.
���������� ������������ ���������� ����������:
0 - ��������� ��������� � ��������� ������ ������� (����) �������� ��������� ��������� ������������ error_log.
1 - ��������� ������������ �� ����������� �����, �� ������, ���������� � ��������� destination. ��� ������������ ��� ���������, ������������ ��������� �������� extra_headers, � ������� ����� ������� �������������� ��������� (��� � ������� mail()).
2 - ��������� ���������� ����� ����������� �������. ��� �������� ������ � ������, ���� �������� ��������� ������� ��� �������� � ����� ������������. ��� ����� ����� ������ ���� ��������� ����� ����� (��� ��� ��� IP �����) � ���� ������, ������� ����� ��������� ��������� �������. ��� ����� ������� � ��������� destination ��� ���������� ������������.
3 - message ����������� � ����� ����� destination.
������� ��������� �� ������.
��������� :
int error_log(string message, int message_type [, string destination [, string extra_headers]])
���������, ���������� ���� ��������, ����� ���� ���������� � ������ ��������� ��������� web-�������, ���� TCP ��� � ����.
� ������ ��������� message ����������� ���� ���������� ���������. �� ������ ��������� message_type - ���� ��� ������ ���� ����������.
���������� ������������ ���������� ����������:
if(!Ora_London($username, $password)) { error_log("������ Oracle ����������!", 0); }; if(!($foo = allocate_new_foo()) { error_log("������ �������� FOO!", 1, "[email protected]"); } // other ways of calling error_log(): error_log("� ��� ������!", 2, "127.0.0.1:7000"); error_log("� ��� ������!", 2, "localhost"); error_log("� ��� ������!", 3, "/var/tmp/my-errors.log");
error_reporting
��������� ����� ���������� ������.
��������� :
int error_reporting([int level])
������� error_reporting() ���������� ���������� ��������� ���� ���������� ������. ���� ������ ��������, �� ������ �������������� ��. � ��������� ����� ��������� ���������, ����� ��� ������� �����. ���������� ������������ ��������� ������ ��������� ��������, ����� ��������� ������������� � �������� �������� PHP.
��������� ����� ���������� ������.
��������� :
int error_reporting([int level])
������� error_reporting() ���������� ���������� ��������� ���� ���������� ������. ���� ������ ��������, �� ������ �������������� ��. � ��������� ����� ��������� ���������, ����� ��� ������� �����. ���������� ������������ ��������� ������ ��������� ��������, ����� ��������� ������������� � �������� �������� PHP.
error_reporting(2039); // � PHP ���������� E_ALL ^ E_NOTICE error_reporting(E_ALL ^ E_NOTICE); // ��������� �� ��������� error_reporting(0); // ��������� ��������� �� ������� // ����� ������ ���������� error_reporting(E_ERROR | E_WARNING | E_PARSE); // ����� �������� � ����������� ���������� error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); error_reporting(E_ALL); // �������� ��� ������
restore_error_handler
�������������� ����������� ����������� ������.
��������� :
void restore_error_handler()
��� ������� ������������� � �������� ������� ����������� ������ ��, ������� ���� ������� �� ���������� ������ ������� set_error_handler(). ���������� ������������ ����� ���� ����� ������������� ���������������� ���������� ��� ���������� ���������� PHP.
�������������� ����������� ����������� ������.
��������� :
void restore_error_handler()
��� ������� ������������� � �������� ������� ����������� ������ ��, ������� ���� ������� �� ���������� ������ ������� set_error_handler(). ���������� ������������ ����� ���� ����� ������������� ���������������� ���������� ��� ���������� ���������� PHP.
trigger_error
��������� ������.
��������� :
void trigger_error(string error_msg [, int error_type])
���� �������� �������, ������������� ��� ��������� ������, � ������ ������������ � ���� � ������������ ������. ������� �������� ������������ ������ ���������������� ���� ������ ( ��������� �������� E_USER), � �� ���������, ���� �� ������ ��� ������ error_type, �� ��������� E_USER_NOTICE.
�������� �������������� ������� ����������� ��������� � ��������� ������ � �������������� ��������.
��������� ������.
��������� :
void trigger_error(string error_msg [, int error_type])
���� �������� �������, ������������� ��� ��������� ������, � ������ ������������ � ���� � ������������ ������. ������� �������� ������������ ������ ���������������� ���� ������ ( ��������� �������� E_USER), � �� ���������, ���� �� ������ ��� ������ error_type, �� ��������� E_USER_NOTICE.
�������� �������������� ������� ����������� ��������� � ��������� ������ � �������������� ��������.
if(assert($divisor == 0)) trigger_error ("������ ������ �� 0 ", E_USER_ERROR);
user_error
������� ������� trigger_error().
��������� :
void user_error(string error_msg [, int error_type])
������� ������� trigger_error().
��������� :
void user_error(string error_msg [, int error_type])