In PHPWordbootstrap. php: {code...} but here: github. comPHPOffice... does not see the vendor folder? What's going on? In PHPWord/bootstrap. php
Medium:
$vendorDirPath = realpath(__DIR__ . '/vendor');if (file_exists($vendorDirPath . '/autoload.php')) { require $vendorDirPath . '/autoload.php';} else { throw new Exception( sprintf( 'Could not find file \'%s\'. It is generated by Composer. Use \'install --prefer-source\' or \'update --prefer-source\' Composer commands to move forward.', $vendorDirPath . '/autoload.php' ) );}
But here: https://github.com/PHPOffice...
The vendor folder is not displayed?
What's going on?
Reply content:
In PHPWord/bootstrap. php
Medium:
$vendorDirPath = realpath(__DIR__ . '/vendor');if (file_exists($vendorDirPath . '/autoload.php')) { require $vendorDirPath . '/autoload.php';} else { throw new Exception( sprintf( 'Could not find file \'%s\'. It is generated by Composer. Use \'install --prefer-source\' or \'update --prefer-source\' Composer commands to move forward.', $vendorDirPath . '/autoload.php' ) );}
But here: https://github.com/PHPOffice...
The vendor folder is not displayed?
What's going on?
The composer should be generated after being installed.
Without using the composer package management, there is no vendor.
The Exception in throw has been clearly written.
You develop a project to manage package dependencies through composer, and then open-source it to github. However, the third-party libraries you depend on do not need to be placed in the version controller.
You only needcomposer.jsonPut the file,read.meThe installation method is usually described in the file for you to runcomposer install,
ThereforevendorIgnore, git ignorevendorThe method is in.gitignoreAdd this directory.