escpos-php
escpos-php copied to clipboard
Message: copy(\\192.168.3.137\EPSON TM-U220 Receipt): failed to open stream: Permission denied
what is the solution? I use ubuntu server framework CodeIginiter,
`public function index(){
$this->load->library('escpos');
$ip = '192.168.3.137'; // IP Komputer kita atau printer lain yang masih satu jaringan
$printer = 'EPSON TM-U220 Receipt'; // Nama Printer yang di sharing
// membuat connector printer ke shared printer bernama "printer_a" (yang telah disetting sebelumnya)
$connector = new Escpos\PrintConnectors\WindowsPrintConnector("smb://" . $ip . "/" . $printer);
$printer = new Escpos\Printer($connector);
$printer->initialize();
$printer->text("Ini teks biasa \n");
$printer->text("\n");
$printer->close();
}`
I changed the code to something like this
`public function index(){
$this->load->library('escpos');
$ip = '192.168.3.137'; // IP Komputer kita atau printer lain yang masih satu jaringan
$printer = 'EPSON TM-U220 Receipt'; // Nama Printer yang di sharing
// membuat connector printer ke shared printer bernama "printer_a" (yang telah disetting sebelumnya)
$connector = new Escpos\PrintConnectors\WindowsPrintConnector("smb://root:[email protected]/EPSON TM-U220 Receipt");
$printer = new Escpos\Printer($connector);
$printer->initialize();
$printer->text("Ini teks biasa \n");
$printer->text("\n");
$printer->close();
}`
error

Did you solve that problem? I've same issue