Skip to content

Commit

Permalink
添加自动加载函数
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Jan 27, 2015
1 parent 82cb293 commit d9fceaf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

spl_autoload_register(function($class){
if (false !== stripos($class, 'Overtrue\Wechat')) {
require_once __DIR__ ."/src/". str_replace('\\', '/', substr($class, 8)) . ".php";
}
});

0 comments on commit d9fceaf

Please sign in to comment.