エラー処理のための1つのクラスの履歴。

序文(自由にスキップしてください)





素敵な時間をお過ごしください。



私はあなたと物語を共有したいと思っていました。 エラー処理クラスの履歴。 「現状のまま」のクラスを持ち込んで、そのメリットとデメリットを判断させないのはなぜですか。 その理由は簡単です。 この場合、彼が正確に自分になった理由を理解することはできません。 作成ロジックでエラーを検出することは不可能です。 あなたの状況が私の状況に似ているかどうか、それを使用することが可能かどうか、またはおそらく、別のクラスのエラー処理に注意を向けた方が良いかどうかを理解することは不可能です。 幸いなことに、それらの多くが見つかります。



そして、そのような恐怖で私は独自のエラー処理クラスを書き始めましたか? 結局のところ、この領域には多くの基礎があります。 真面目で非常に知的な人々の蓄積。 その理由は簡単です。 さまざまな理由がこれらのクラスの作成につながり、これらのクラスの作成はさまざまな目標を追求しました。 そして、私たち全員がよく知っているように、自転車はほとんどなく、それらはすべて異なる味がします。



最初に、自分のプロジェクトで使用できるいくつかのクラスを作成する必要がありました。これらのクラスは、アナログよりも簡単で高速であり、最も重要なことには、必要な機能を実装します。 これ以上でもそれ以下でもありません。 冗長性はありません。



最初のドラフト





すぐに言ってやった。 クラスが作成されました。 そして、当然のことながら、それらはすべて何らかの形でエラーを処理する必要がありました。 そのような処理のために作成した要件は次のとおりです。

したがって、すべては比較的単純です。 エラー処理を実装するためにクラスに追加するもの: Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  1. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  2. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  3. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  4. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  5. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  6. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  7. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  8. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  9. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  10. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  11. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  12. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  13. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  14. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  15. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  16. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  17. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  18. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  19. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  20. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  21. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  22. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  23. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  24. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  25. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  26. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  27. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  28. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  29. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  30. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  31. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  32. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  33. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  34. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );







  35. Copy Source | Copy HTML class test_class{ private $err ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function some_method(){ $this ->clear_err(); if (some_err){ $this ->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->clear_err(); $this ->some_method(); if ( $this ->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->is_err()!== false ){ die ( $test_instance ->is_err()); } die ( 'No error appear.' );











別のクラスでの機能の分離





よくここに。 すべてが機能します。 不快な瞬間は1つだけです。 このコードは、すべてのクラスで繰り返されます。 クラスは1つでしたが、すべてが順調でした。 しかし、クラスの数が増えるとすぐに、少なくとも不快になりました。 そのため、コードは別のクラスに割り当てられました。

Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  1. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  2. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  3. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  4. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  5. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  6. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  7. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  8. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  9. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  10. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  11. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  12. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  13. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  14. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  15. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  16. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  17. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  18. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  19. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  20. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  21. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  22. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  23. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  24. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  25. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  26. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  27. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  28. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  29. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  30. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  31. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  32. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  33. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  34. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  35. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  36. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  37. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  38. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  39. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  40. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );







  41. Copy Source | Copy HTML class error_class{ private $err = false ; public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } } class test_class{ public $err ; public function __construct(){ $this ->err = new error_class(); } public function some_method(){ $this ->err->clear_err(); if (some_err){ $this ->err->set_err( $msg = 'Some error appear.' ); return false ; } return true ; } public function complex_method(){ $this ->err->clear_err(); $this ->some_method(); if ( $this ->err->is_err()!== false ){ return false ; } return true ; } } define( 'some_err' , true ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ die ( $test_instance ->err->is_err()); } die ( 'No error appear.' );











例外を使用して重大なエラーを処理します。





よくここに。 すでに良い。 それを使用するクラスファイルの先頭に一度追加することで、任意のクラスで使用できます。

Copy Source | Copy HTML require_once ( "error_class.php" );







Copy Source | Copy HTML require_once ( "error_class.php" );







  1. Copy Source | Copy HTML require_once ( "error_class.php" );











それはエラーの存在に関する単なる情報であり、彼は送信しますが、その処理は扱いません。 エラーをインターセプトしてハンドラーに送信するための追加のクラスを作成するのはかなり奇妙なので、機能を少し拡張しましょう。





例外を使用し 、重大なエラーを処理します。

set_exception_handler-カスタム例外ハンドラーを定義します。

restore_exception_handler-例外の以前のハンドラーを復元します。

例外は、すべての例外の基本クラスです。



すべてが基本です。





また、コードは次の形式を取ります。

Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  1. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  2. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  3. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  4. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  5. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  6. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  7. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  8. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  9. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  10. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  11. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  12. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  13. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  14. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  15. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  16. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  17. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  18. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  19. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  20. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  21. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  22. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  23. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  24. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  25. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  26. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  27. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }







  28. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; public function __construct( $callback =null){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); } } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } } }









クラスを使用すると、次のようになります。

Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  1. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  2. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  3. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  4. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  5. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  6. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  7. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  8. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  9. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }







  10. Copy Source | Copy HTML define( 'some_err' , true ); $err = new error_class( "err_overwork" ); $test_instance = new test_class; $test_instance ->complex_method(); if ( $test_instance ->err->is_err()!== false ){ $err ->fire_err( $test_instance ->err->is_err(),- 1 ); } function err_overwork( $error ){ die ( ": " . $error ->getMessage(). "<br/>: " . $error ->getFile(). "<br/>: " . $error ->getLine()); }











インタープリターによって生成されたエラーの処理。





よくここに。 今は1つだけを追加します。 ユーザー定義のエラー処理関数とインタープリターによって生成されたエラー(もちろん、構文エラーを除く)を送信する機能(つまり、機会)。 このようにして、エラーを均一に表示できます。 もちろん、この必要性は非常に物議を醸しています。 使用するかどうか-あなたが決める。 これは時々適切であるように思えます。



set_error_handler-ユーザー出口にエラー処理を渡すことができます。

restore_error_handler-以前のエラーハンドラーを復元します。

ErrorException-エラーを表す例外クラス。



原則として、複雑なことは何もありません。 set_error_handlerを使用して、ハンドラー設定すると完了です。 コンストラクターの追加の引数として、以下を受け入れます。



しかし、ニュアンスがあります。 私たちが生成したエラーの場合、ハンドラーはExceptionオブジェクトを受け取ります。 ただし、エラーがインタープリターによって生成された場合、インタープリターは一連の引数を受け取ります。 当然、ソースに関係なく、プロセッサに同種のデータを受信させることが適切です。 ErrorExceptionオブジェクトは、このために特別に開発されました。 そのため、エラーを処理する、つまり、ユーザーが割り当てたハンドラーによって既にキャッチされる例外を発生させる、エラー処理クラスにredirect_err関数を追加します。 さらに、インタープリターによって生成されたエラーがインターセプトされ、必要に応じてクラスデストラクターrestore_error_handler関数を使用して以前のハンドラーを復元する必要があることを示すフラグを追加します。

そして今、私たちのクラスは完成したすぐに使える外観を取ります:

Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  1. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  2. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  3. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  4. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  5. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  6. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  7. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  8. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  9. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  10. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  11. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  12. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  13. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  14. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  15. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  16. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  17. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  18. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  19. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  20. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  21. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  22. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  23. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  24. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  25. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  26. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  27. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  28. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  29. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  30. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  31. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  32. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  33. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  34. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  35. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  36. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  37. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  38. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  39. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }







  40. Copy Source | Copy HTML class error_class{ private $err = false ; private $exception_handler = false ; private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback !=null){ $this ->exception_handler= true ; set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0, $errno , $errfile , $errline ); return true ; } public function set_err( $msg = '' ){ $this ->err= $msg ; } public function clear_err(){ $this ->err= false ; } public function is_err(){ return $this ->err; } public function fire_err( $msg = '' , $code =0){ $this ->err= $msg ; throw new Exception ( $msg , $code ); } public function __destruct(){ if ( $this ->exception_handler){ restore_exception_handler(); } if ( $this ->err_redirect){ restore_error_handler(); } } }









そして、これを使用した実際に存在するコード例は次のとおりです。

Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  1. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  2. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  3. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  4. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  5. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  6. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  7. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  8. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  9. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  10. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  11. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  12. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  13. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  14. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  15. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  16. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  17. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  18. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  19. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  20. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  21. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  22. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  23. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  24. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  25. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  26. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  27. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  28. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  29. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  30. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  31. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  32. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  33. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  34. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  35. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  36. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  37. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  38. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  39. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  40. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  41. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  42. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  43. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  44. Copy Source | Copy HTML <?php session_start(); require_once ( "error_class.php" ); require_once ( "mail_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ $err ->fire_err( " " ,- 1 ); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ $err ->fire_err( " " ,- 1 ); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); if (! $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ])))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->to( " « »" , "raven@nightfolk.net" )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->from(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->subj( ' ' )){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->reply_to(addslashes( $_POST [ 'email' ]))){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } if (! $mailer ->send()){ $err ->fire_err( $mailer ->err->is_err(),- 1 ); } header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>









啓発(重要)



大勢の非常に怒っている人々との嵐のような生産的なコミュニケーションの後、

記事「 OOPでの例外処理 」の読み方

PHP の例外メカニズムに関するドキュメントを 3 回読み直す

最後に、phpclub.ruフォーラムでの問題の議論

例外はエラー処理を実装するための十分なメカニズムであり、他のものをドラッグする意味がないことを理解しました。

ただし、デフォルトの例外ハンドラーの宛先コードと各エントリポイントでインタープリターによって生成されたエラーメッセージハンドラーを複製しないために、クラスが次の形式で存在することは理にかなっています。

Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  1. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  2. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  3. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  4. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  5. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  6. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  7. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  8. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  9. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  10. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  11. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  12. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  13. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  14. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  15. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  16. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  17. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  18. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  19. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  20. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  21. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  22. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







  23. Copy Source | Copy HTML class error_class{ private $err_handler = false ; public function __construct( $callback =null, $err_redirect = true , $level =E_ALL){ if ( $callback ==null){ throw new Exception ( " callback ." ,E_ERROR); } set_exception_handler( $callback ); if ( $err_redirect ){ $this ->err_handler = true ; set_error_handler( array ( "error_class" , "redirect_err" ), $level ); } } public function redirect_err( $errno , $errstr , $errfile , $errline , $errcontext ){ throw new ErrorException ( $errstr , 0 , $errno , $errfile , $errline ); return true ; } public function __destruct(){ restore_exception_handler(); if ( $this ->err_handler){ restore_error_handler(); } } }







これで、1行でハンドラーを割り当てることができます。 Copy Source | Copy HTML new error_class( 'err_overwork' ); function err_overwork( $error ){ }







Copy Source | Copy HTML new error_class( 'err_overwork' ); function err_overwork( $error ){ }







  1. Copy Source | Copy HTML new error_class( 'err_overwork' ); function err_overwork( $error ){ }







  2. Copy Source | Copy HTML new error_class( 'err_overwork' ); function err_overwork( $error ){ }







  3. Copy Source | Copy HTML new error_class( 'err_overwork' ); function err_overwork( $error ){ }











さて、スクリプトは次のようになります。



Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  1. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  2. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  3. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  4. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  5. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  6. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  7. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  8. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  9. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  10. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  11. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  12. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  13. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  14. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  15. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  16. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  17. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  18. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  19. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  20. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  21. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  22. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  23. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  24. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  25. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  26. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  27. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  28. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  29. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  30. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  31. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  32. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>







  33. Copy Source | Copy HTML <?php session_start(); header( "content-type: text/html; charset=utf-8" ); require_once ( "mail_class.php" ); require_once ( "error_class.php" ); $err = new error_class( "err_overwork" ); if ( ! isset ( $_POST [ 'email' ])|| ! isset ( $_POST [ 'message' ])|| ! isset ( $_POST [ 'captcha' ]) ){ throw new Exception ( " " ,E_ERROR); } if ( $_SESSION [ 'captcha' ]!= $_POST [ 'captcha' ]){ throw new Exception ( " " ,E_ERROR); } else { unset ( $_SESSION [ 'captcha' ]); } $mailer = new mail_class(); $mailer ->text(addslashes(htmlspecialchars( $_POST [ 'message' ]))); $mailer ->to( " « »" , "raven@nightfolk.net" ); $mailer ->from(addslashes( $_POST [ 'email' ])); $mailer ->subj( ' ' ); $mailer ->reply_to(addslashes( $_POST [ 'email' ])); $mailer ->send(); header( "location:../confirm.html" ); die (); function err_overwork( $error ){ $_SESSION [ 'error_message' ]= $error ->getMessage(); header( "location:../error.php" ); die (); } ?>











あとがき(原則-特に重要なことは何もありません)





この記事があなたにとって興味深いものになるか、あるいは何らかの利益をもたらすことさえ願っています。

私はこれについてとてもうれしいです。

クラスとその開発プロセスについての考えを書いていただければ幸いです。

改善できるものがあれば、書いてください。

欠陥、脆弱性、またはエラーが見つかった場合は、 書き込みます。

そして、あなたが書くなら、この世界では、おそらく、少なくとも長い間、それは私をより幸せにするでしょう。

また、その記事が気に入ったかどうか、または長くて退屈であることが判明したかどうかを書きます。 もっと書くべきかどうか知りたいです...それとも、グラフォマニアックの苦痛だけでしょう。

PSキャッシングクラスまたはテンプレートエンジンについても説明できます。 しかし、あなたは決して知らない。 主なことは、あなたにとって興味深いことです。



謝辞(要読込)





habrahabrへの招待、素晴らしいYASSフレームワーク、そして接着されてくれたsunnybearに感謝します。 私はまだRITAで彼が好きだった。

YASSに興味を示してくれて、面白いラッパーを書いて、話をするだけで楽しいhabranameに感謝します。

時間をかけて明確にし、追加の実験を推進してくれたzerkmに感謝します。



All Articles