Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- #Ulin Project 2017
- spl_autoload_register(
- function ($n) {
- $arr = explode('\', $n, 2);
- if(isset($arr[0])){
- if(isset($arr[1])){
- if($arr[0] == 'err'){
- include '/home/www/html/DELETE2/ru/'.str_replace('\', '/', $arr[1]).'.php';
- }
- }
- }
- }
- );
- try{
- throw new errnewMessage('Привет как дела...');
- # в лс используются не правильные символы шли искл
- }catch(Exception $e){
- echo 'Ошибка:'.$e->text;
- }
- <?php
- namespace err;
- use Exception;
- class newMessage extends Exception {
- public $text;
- public function __construct($e){
- $this->text='Не правильное лс:'.$e;
- parent::__construct($this->text);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement