Skip to content

Commit

Permalink
添加autoload.php自动加载方法
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoming13 committed Sep 12, 2016
1 parent 314610c commit 268b73f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
spl_autoload_register(function ($class) {
if (false !== stripos($class, 'Gaoming13\WechatPhpSdk')) {
require_once __DIR__.'/src/'.str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 10)).'.class.php';
}
});

0 comments on commit 268b73f

Please sign in to comment.