我将如何在 Fat-free 框架中使用 PHPExcel 库?

How would I use PHPExcel library in Fat-free framework?

我有一个项目需要 PHPExcel 库 (https://github.com/PHPOffice/PHPExcel) 与我移植到 Fat-free 框架的应用程序一起使用。

我会如何 use/reference 这个包。谢谢 !

我推荐你使用作曲家。这样你就可以调用特定的 class,因为 autoload.php 会自动加载你需要的每个 class。

<?php

require 'vendor/autoload.php';

$f3 = Base::instance();

$f3->route('GET /', function() use($f3) {
    $excel = new PHPExcel();
});

$f3->run();