Blame view

framework/library/alioss/autoload.php 289 Bytes
4d84a934   曹明   初始代码提交
1
2
3
4
5
6
7
8
9
10
11
<?php

function classLoader($class)
{
    $path = str_replace('\\', DIRECTORY_SEPARATOR, $class);
    $file = __DIR__ . DIRECTORY_SEPARATOR .'src'. DIRECTORY_SEPARATOR . $path . '.php';
    if (file_exists($file)) {
        require_once $file;
    }
}
spl_autoload_register('classLoader');