note 65805 deleted from function.set-error-handler by sobak

From: Date: Sat, 10 Dec 2016 23:34:29 +0000
Subject: note 65805 deleted from function.set-error-handler by sobak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208473@lists.php.net to get a copy of this message
Note Submitter: kariedoo ---- function errorlog($type, $info, $file, $row) { if ($handle = fopen("./log/ftp_error.log", "a")) { @fwrite($handle, date("Y-m-d H:i:s")." "--> $type: $info FILE: $file - Row $row\r\n" ); @fclose($handle); }//end if }//end function ### in the error logging code for example ftp: ### set_error_handler("errorlog"); //set your own Handler $this->connect = ftp_connect(TXTCONNECT); $this->login = ftp_login($this->connect, TXTID, FTPPASS); $this->systype= ftp_systype($this->connect); restore_error_handler(); //restore the old handler ------------------ content in file ------------------ 2006-05-08 09:36:02 2: ftp_login(): Login incorrect. FILE: /html/cgi-bin/test/classes/ftp.class.php - Row 63

« previous php.notes (#208473) next »