1 Unstar Star 0 Fork 0

董楠 / MicroRouterPHPBSD-3-Clause

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
一个PHP路由 spread retract

Clone or download
autoload.php 412 Bytes
Copy Edit Web IDE Raw Blame History
董楠 authored 2016-03-06 22:53 . 增加 autoload.php
<?php
//自动加载类文件
spl_autoload_register(function($class) {
if (false !== strpos($class, '\\')) {
$name = strstr($class, '\\', true);
if ($name === 'MicroRouter') {
$filename = __DIR__ . '/' . 'src/' . str_replace('\\', '/', $class) . '.php';
if (file_exists($filename)) {
include $filename;
}
}
}
});

Comment ( 0 )

Sign in for post a comment

PHP
1
https://git.oschina.net/dongnan/MicroRouter.git
git@git.oschina.net:dongnan/MicroRouter.git
dongnan
MicroRouter
MicroRouter
master

Search