escpos-php icon indicating copy to clipboard operation
escpos-php copied to clipboard

Error using mike42/escpos-php library

Open malihaz opened this issue 3 years ago • 1 comments

Im working on PHP based web application for booking. The guest room owner wants to use Black Copper BC-90AC thermal printer, which is USB printer for guest receipt. So I want to use mike42/escpos-php for the purpose. I have included the library into my project using composer, however when I run a test page, I get following error.

Warning: require(E:\XAMPP\htdocs\test\vendor\mike42\escpos-php\example/vendor/autoload.php): failed to open stream: No such file or directory in E:\XAMPP\htdocs\test\vendor\mike42\escpos-php\example\demo.php on line 11

Fatal error: require(): Failed opening required 'E:\XAMPP\htdocs\test\vendor\mike42\escpos-php\example/vendor/autoload.php' (include_path='E:\XAMPP\php\PEAR') in E:\XAMPP\htdocs\test\vendor\mike42\escpos-php\example\demo.php on line 11

Any suggestions would be appreciated.

malihaz avatar Dec 21 '20 16:12 malihaz

What you're missing is running composer install, which will import your packages and create the vendor folder, along with the autoload script.

WangElectronics avatar Jan 18 '22 22:01 WangElectronics