Advertisement
Guest User

Untitled

a guest
Jul 15th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <?php
  2.  
  3. #Ulin Project 2017
  4.  
  5. spl_autoload_register(
  6. function ($n) {
  7. $arr = explode('\', $n, 2);
  8.  
  9. if(isset($arr[0])){
  10. if(isset($arr[1])){
  11. if($arr[0] == 'err'){
  12. include '/home/www/html/DELETE2/ru/'.str_replace('\', '/', $arr[1]).'.php';
  13. }
  14. }
  15. }
  16. }
  17. );
  18.  
  19.  
  20. try{
  21. throw new errnewMessage('Привет как дела...');
  22. # в лс используются не правильные символы шли искл
  23.  
  24. }catch(Exception $e){
  25. echo 'Ошибка:'.$e->text;
  26. }
  27.  
  28. <?php
  29.  
  30. namespace err;
  31. use Exception;
  32.  
  33. class newMessage extends Exception {
  34. public $text;
  35.  
  36. public function __construct($e){
  37. $this->text='Не правильное лс:'.$e;
  38.  
  39. parent::__construct($this->text);
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement