PHP Classes
elePHPant
Icontem

File: Vourto/vendor/autoload.php

Recommend this page to a friend!
  Classes of Mauro Junior  >  Vourto  >  Vourto/vendor/autoload.php  >  Download  
File: Vourto/vendor/autoload.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Vourto
Validate request values of different types
Author: By
Last change:
Date: 16 days ago
Size: 351 bytes
 

Contents

Class file image Download
<?php
spl_autoload_register
(function($class){
    try{
        if(
file_exists(__DIR__."/vendor/__class/${class}.class.php")):
            require_once
__DIR__."/vendor/__class/${class}.class.php";
        else:
           
error_reporting(0); //disables default error
           
throw new Exception("Class ${class} not found");
        endif;
    }catch(
Exception $e){
        echo
$e->getMessage();
    }
});