mike42 / escpos-php

PHP library for printing to ESC/POS-compatible thermal and impact printers
Other
2.54k stars 862 forks source link

Error using mike42/escpos-php library #1012

Open malihaz opened 3 years ago

malihaz commented 3 years ago

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.

WangElectronics commented 2 years ago

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