We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
我们一般都会用到发邮件、生成二维码等其他的一些类库。这些类库一般也会包含自己的一些自动加载机制。
我们将会首先检查库的入口文件(也就是必须先包含的那个文件),看其中包含的类名是否符合 类名.php 这种形式。
类名.php
我们将此目录放到 app/library/ 或其他你认为方便查找的目录下,然后在入口文件中增加:
AtomCode::registerAutoloadDir($path);
我们一样可以放到任何地方,但是我们需要创建一个库入口文件到该库的目录中,该文件仅需要 include 一下该库的入口文件,文件名全名为: 类名.php
例如:
QRcode.php
<?php include __DIR__ . '/qrcode/phpqrcode.php';