Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/243.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHPWord-Class'';PhpOffice\PhpWord\PhpWord';找不到_Php_Laravel - Fatal编程技术网

PHPWord-Class'';PhpOffice\PhpWord\PhpWord';找不到

PHPWord-Class'';PhpOffice\PhpWord\PhpWord';找不到,php,laravel,Php,Laravel,找不到获取错误类“PhpOffice\PhpWord\PhpWord” mycomposer.json “php”:“>=7.0.0”, “abrigham/laravel电子邮件例外情况”:“^1.3”, “barryvdh/laravel调试栏”:“^3.2”, “barryvdh/laravel dompdf”:“^0.8.4”, “ckfinder/ckfinder laravel软件包”:“^3.5”, “karlomikus/theme”:“^1.0”, “laravel/框架”:“

找不到获取错误类“PhpOffice\PhpWord\PhpWord” mycomposer.json “php”:“>=7.0.0”, “abrigham/laravel电子邮件例外情况”:“^1.3”, “barryvdh/laravel调试栏”:“^3.2”, “barryvdh/laravel dompdf”:“^0.8.4”, “ckfinder/ckfinder laravel软件包”:“^3.5”, “karlomikus/theme”:“^1.0”, “laravel/框架”:“5.5.”, “拉威尔/社交名流”:“^3.0”, “拉威尔/修补匠”:“~1.0”, “laravelcollective/html”:“^5.4.0”, “leafo/scssphp”:“^0.7.7”, “maatwebsite/excel”:“~2.1.0”, “nicolaslopezj/searchable”:“1.”, “niklasravnsborg/laravel pdf”:“^3.1”, “phpoffice/phpword”:“^0.17.0”, “shivella/laravel bitly”:“^1.0”, “simplesoftwareio/simple qrcode”:“^2.0”, “sofa/laravel全局范围”:“^0.2.0”, “yajra/laravel数据表”:“^1.0”, “yajra/laravel datatables oracle”:“^8.0”, “zendframework/zend escaper”:“^2.6”, “zendframework/zend stdlib”:“^3.2”

也许这可以帮助您

// Creating the new document...
$phpWord = new \PhpOffice\PhpWord\PhpWord();

/* Note: any element you append to a document must reside inside of a Section. */

 // Adding an empty Section to the document...
$section = $phpWord->addSection();

// Adding Text element to the Section having font styled by default...
$section->addText(
    htmlspecialchars(
        '"Learn from yesterday, live for today, hope for tomorrow. '
            . 'The important thing is not to stop questioning." '
            . '(Albert Einstein)'
    )
);

// Saving the document as HTML file...
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');
$objWriter->save('helloWorld.html');


  [1]: https://stackoverflow.com/a/31627457/1873569

执行此命令
composer dump autoload
请格式化代码。另外,请指定您正在使用的框架和其他详细信息。请共享更多详细信息。您是否检查过该类是否正确存储?您是否检查过自动加载器是否包括在内?请在您的回答中添加一些进一步的解释。所有这些代码,特别是爱因斯坦的引用,是如何解决问题中给出的自动装弹机问题的?