Friday, September 24, 2010

Teach you quickly learn how to record "unknown error" occurs

Done using the MySQL database site, will surely not know the error occurred, how records show? The following is the specific solution:


/ / 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)


(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:

MKV To Xbox 360

Onimusha 3 details all captures


I am a third Category

Instant Messaging SPI Translation

VBScript While ... Wend Statement

interpretation of on demand ibm on demand

comparison PERSONAL Finance

Report Cursors And Fonts

Flash to MPEG

Enhance the concept of active INTRUSION prevention IPS is not speculation

The SMTP user authentication based on QMail Setup Guide (Part Two)

Compilation of various source - col

"Era Of Exploration Of The Beginning Of 1404," Talk About My Own Experience

Catalogs Audio And Multimedia

No comments:

Post a Comment