我想在我的Laravel项目中使用这个包 https://github.com/FineUploader/php-traditional-server/。所以我修改了composer.json文件:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"fineuploader/php-traditional-server": "1.0.0"
}
运行compose update命令。但是我该如何在我的Controller中使用UploadHandler
类(在包的handler.php中声明)?
$u = new UploadHandler();
时,它显示Class 'MyApp\Http\Controllers\UploadHandler' not found
。 - hienbt88UploadHandler
前面添加反斜杠。像这样:$u = new \UploadHandler();
- Giedrius Kiršys