简体   繁体   中英

Class not found when using a package with Netbeans/Composer

I'am using NetBeans IDE 8.2, I created a PHP application and using the composer within the IDE, I installed a package "phpspreadsheet" :

在此处输入图片说明

The package is then installed in the vendor folder and I even have the autocompletion when using the package's classes.

在此处输入图片说明

But when I run this project, it's throws me this error :

Fatal error: Class 'PhpOffice\\PhpSpreadsheet\\IOFactory' not found in C:\\wamp64\\www\\NetBeansComposer\\index.php on line 5

Is it beacause WAMP can't access the vendor folder? How can I fix this?

require_once __DIR__ . '/vendor/autoload.php';

为我解决了问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM