We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fea757 commit 3d5e018Copy full SHA for 3d5e018
README.md
@@ -26,6 +26,17 @@
26
27
- 执行 `$ php composer.phar install` 或 `$ composer install` 进行安装。
28
29
+#### 直接下载源码安装
30
+
31
+> 直接下载源代码也是一种安装 SDK 的方法,不过因为有版本更新的维护问题,所以这种安装方式**十分不推荐**,但由于种种原因导致无法使用 Composer,所以我们也提供了这种情况下的备选方案。
32
33
+- 下载源代码包,解压到项目中
34
+- 在项目中引入 autoload:
35
36
+```php
37
+require 'path_to_sdk/autoload.php';
38
+```
39
40
## Usage
41
42
- [Init API](doc/api.md#init-api)
autoload.php
@@ -0,0 +1,10 @@
1
+<?php
2
+function classLoader($class)
3
+{
4
+ $path = str_replace('\\', DIRECTORY_SEPARATOR, $class);
5
+ $file = __DIR__ . '/src/' . $path . '.php';
6
+ if (file_exists($file)) {
7
+ require_once $file;
8
+ }
9
+}
10
+spl_autoload_register('classLoader');
0 commit comments