note 104599 added to function.set-error-handler
| From: | ahmed dot 3abdolah at gmail dot com | Date: | Fri, 24 Jun 2011 19:23:49 +0000 |
| Subject: | note 104599 added to function.set-error-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-180932@lists.php.net to get a copy of this message | ||
Hello , this function help you to have a best security from error php and ...... and you should
travel with set_error_handler :
look at this :
<?
/*/
|------------------------------------------->|*|
* Powred By Mr-O --------------------------->|*|
* This Is Project ::->F.F.P----------------->|*|
* Fatale Functions PHP .-------------------->|*|
* Allready Created By MR-O .---------------->|*|
* It's A Free Functions And Class For Use.-->|*|
|------------------------------------------->|*|
/*/
function error_protect($errno,$errstr,$errfile,$errline){
if(error_reporting()>0){
$file = "error_protect.txt"; // you should create a file .txt and change this name
file_put_contents($file," ERROR type [$errno] :-> [$errstr] in file :-> $errfile , in
line :-> $errline \n", FILE_APPEND | LOCK_EX);
}
}
set_error_handler("error_protect",E_ALL); //<-- This is the best solution to have a
nice function
?>
a big thanks from TEAMDZ .
MR-O
----
Server IP: 69.147.83.197
Probable Submitter: 41.102.222.51
----
Manual Page -- http://www.php.net/manual/en/function.set-error-handler.php
Edit -- https://master.php.net/note/edit/104599
Del: integrated -- https://master.php.net/note/delete/104599/integrated
Del: useless -- https://master.php.net/note/delete/104599/useless
Del: bad code -- https://master.php.net/note/delete/104599/bad+code
Del: spam -- https://master.php.net/note/delete/104599/spam
Del: non-english -- https://master.php.net/note/delete/104599/non-english
Del: in docs -- https://master.php.net/note/delete/104599/in+docs
Del: other reasons-- https://master.php.net/note/delete/104599
Reject -- https://master.php.net/note/reject/104599
Search -- https://master.php.net/manage/user-notes.php