我把phpexcel放到/silex/vendor/
索引.php:
<?php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app->register(new Silex\Provider\PHPExel());
$app->get('/hello', function() {
$objPHPExcel = \PHPExcel::newInstance();
$objPHPExcel = $objReader->load('123.xls');
return 'Hello!';
});
$app->run();
Fatal error: Class 'Silex\Provider\PHPExel' not found