How does one record unknown errors in MySQL when using MySQL as a site? The solution is as follows:
Class. method
// Create an error log
Function error (){
$ Fp = @ fopen ("error. dat", "a + ");
$ Time = date ("Y-m-d H: I: s ");
$ Msg = "{VisitedTime: $ time}/t
{VisiterIP:
When MySQL is used as a site, unknown errors may occur. how can this problem be recorded? The solution is as follows:
___ FCKpd ___ 0
The above code is an error record method in a class I used.
This is called on the page that uses the MySQL connection.
The following code directly creates an error log in your Directory.
If (MySQL_error ()){
$ Classname-> error ();
}
________________________
If an error occurs on your page, the information will not be leaked as long as you shield the page for concealment.
Error. dat content is (eg .)
{VisitedTime: 2002-05-09 14:43:56}
{VisiterIP: 127.0.0.1}
{Errormsg: Duplicate entry '0' for key 1}
{File:->/path/errorfilename. PHP}
{User: sports98}
Such records are certainly good for analysis pages.
If you are using include, do not add _ LINE __
If you are using require, we recommend that you add _ LINE _ to help you quickly locate the error and solve the problem.
SERVER [REMOTE_ADDR]}/t
{Errormsg: ". MySQL_error ()."}/t
{File:->
When MySQL is used as a site, unknown errors may occur. how can this problem be recorded? The solution is as follows:
___ FCKpd ___ 0
The above code is an error record method in a class I used.
This is called on the page that uses the MySQL connection.
The following code directly creates an error log in your Directory.
___ FCKpd ___ 1
If an error occurs on your page, the information will not be leaked as long as you shield the page for concealment.
Error. dat content is (eg .)
___ FCKpd ___ 2
Such records are certainly good for analysis pages.
If you are using include, do not add _ LINE __
If you are using require, we recommend that you add _ LINE _ to help you quickly locate the error and solve the problem.
SERVER [PHP_SELF]}/t
{User:
When MySQL is used as a site, unknown errors may occur. how can this problem be recorded? The solution is as follows:
___ FCKpd ___ 0
The above code is an error record method in a class I used.
This is called on the page that uses the MySQL connection.
The following code directly creates an error log in your Directory.
___ FCKpd ___ 1
If an error occurs on your page, the information will not be leaked as long as you shield the page for concealment.
Error. dat content is (eg .)
___ FCKpd ___ 2
Such records are certainly good for analysis pages.
If you are using include, do not add _ LINE __
If you are using require, we recommend that you add _ LINE _ to help you quickly locate the error and solve the problem.
SESSION [user]}/r/n ";
@ Fputs ($ fp, $ msg );
@ Fclose ($ fp );
}
The above code is an error record method in a class I used.
This is called on the page that uses the MySQL connection.
The following code directly creates an error log in your Directory.
___ FCKpd ___ 1
If an error occurs on your page, the information will not be leaked as long as you shield the page for concealment.
Error. dat content is (eg .)
___ FCKpd ___ 2
Such records are certainly good for analysis pages.
If you are using include, do not add _ LINE __
If you are using require, we recommend that you add _ LINE _ to help you quickly locate the error and solve the problem.