|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
if ( file_exists(dirname(__FILE__).'/vendor/autoload.php') ) { |
|
4
|
|
|
require_once dirname(__FILE__).'/vendor/autoload.php'; |
|
5
|
|
|
} |
|
6
|
|
|
|
|
7
|
|
|
function classLoader($class) |
|
8
|
|
|
{ |
|
9
|
|
|
$path = str_replace('\\', DIRECTORY_SEPARATOR, $class); |
|
10
|
|
|
$file = __DIR__ . '/src/' . $path . '.php'; |
|
11
|
|
|
|
|
12
|
|
|
if (file_exists($file)) { |
|
13
|
|
|
require_once $file; |
|
14
|
|
|
} |
|
15
|
|
|
} |
|
16
|
|
|
spl_autoload_register('classLoader'); |
|
17
|
|
|
|
|
18
|
|
|
require_once __DIR__ . '/src/Qiniu/functions.php'; |
|
19
|
|
|
require_once __DIR__ . '/src/Qiniu/Http/Middleware/Middleware.php'; |
|
20
|
|
|
|