Skip to content

Commit

Permalink
Samples : Allow to run without composer
Browse files Browse the repository at this point in the history
  • Loading branch information
pal-software authored and Progi1984 committed Dec 12, 2023
1 parent 3b1ab43 commit 3d23ffe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion samples/Sample_Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
if (is_file(dirname(__DIR__) . '/vendor/autoload.php')) {
require_once dirname(__DIR__) . '/vendor/autoload.php';
} else {
throw new Exception('Can not find the vendor folder!');
if (is_file(__DIR__. '/../../Common/src/Common/Autoloader.php')) {
include_once __DIR__ . '/../../Common/src/Common/Autoloader.php';
\PhpOffice\Common\Autoloader::register();
} else {
throw new Exception ('Can not find the vendor or the common folder!');
}
}
// do some checks to make sure the outputs are set correctly.
if (false === is_dir(__DIR__ . DIRECTORY_SEPARATOR . 'results')) {
Expand Down

0 comments on commit 3d23ffe

Please sign in to comment.