Done using the MySQL database site, will surely not know the error occurred, how records show? The following is the specific solution:
class.method
/ / Create the error log
function error () (
$ Fp = @ fopen ("error.dat", "a +");
$ Time = date ("Y-m-d H: i: s");
$ Msg = "(VisitedTime: $ time) t
(VisiterIP: $ _SERVER [REMOTE_ADDR]) t
(Errormsg: ". MySQL_error ()."} t
(File :->$_ SERVER [PHP_SELF]) t
(User: $ _SESSION [user])
";
@ Fputs ($ fp, $ msg);
@ Fclose ($ fp);
)
I use the above code is a class of error recording.
In your page using the MySQL connection within this call.
The following code directly in your directory set up the error log.
if (MySQL_error ()) (
$ Classname-> error ();
)
________________________
If your error page, the page you are shielded enough as long as they cover, would not disclose the information, and the relative in this directory on the establishment of a
error.dat content (eg.)
(VisitedTime :2002-05-09 14:43:56)
(VisiterIP: 127.0.0.1)
(Errormsg: Duplicate entry '0 'for key 1)
(File: -> / path / path / errorfilename.PHP)
(User: sports98)
This record is definitely for the good of the page.
If you do not include add __LINE__
If you require such proposals to join __LINE__ better help you quickly find the wrong location, to facilitate problem-solving.
Recommended links:
Evaluate Religion
cabling system channel performance of the network
RMVB to MP4
When the "vision" into a "trap"
3G2 To MOV
Dreamweaver MX 2004 from scratch (7)
Sold 250 million shares of Stone would definitely quit Sina Sina
PB control "macro SUBSTITUTION"
MKV to MP4
How Can We Know That You AutoCad Screen Shown On The Graphs Of 1:1
for you Games SPORTS
Liang Dong, vice president of Baidu's resignation
Father Wang Yongmin Tan Wubi Chinese Language Programming
Watch cool mechanical picture production process
China Does Not Thereby Adversely Affecting The Timing Of 3G Licenses As Early As 4 Years Will Be Hug
No comments:
Post a Comment