我正在开发一个项目,我的客户想要热敏打印系统。我在localhost上尝试并运行良好。当我在服务器上传它不能正常工作时,我添加一个打印机作为通用文本plain.Here是我的代码..
$connector = new WindowsPrintConnector("Receipt Printer");
$printer = new Printer($connector);
$printer -> initialize();
$printer -> setJustification( Printer::JUSTIFY_CENTER );
$printer -> selectPrintMode( Printer::MODE_DOUBLE_WIDTH |
$printer -> text("Order ID : ".$orderid."\n");
$printer -> text("Employee ID : ".$empid."\n");
$printer -> text("Dish Name : ".$dishname."\n");
$printer -> text("thanks for Ordering...\n");
$printer -> cut();
在localhost中完美地工作。请告诉我如何连接打印机...
Couldn't print to this printer: Failed to print. Command "smbclient '//cs1008.webhostbox.net/Receipt Printer' -c 'print -' -N" failed with exit code 127: sh: smbclient: command not found
我收到此错误消息..我知道问题是连接..请告诉我有什么方法可以解决这个问题。我使用qz.io库但它提示..请帮助我..
答案 0 :(得分:2)
在远程服务器上安装smbclient