このリンクから(Printing to POS printer from PHP)私はPHPサンプルコードを使い始めました。私の質問は、私のプリンタがデフォルトに設定されている理由、なぜ私はプリンタに接続する必要があります。とにかく私はプリンターを接続する際にエラーが発生しています。 私のプリンタ名はfig1にあり、プリンタにアクセスするためには、図2のように\ Sah-it \ ARP-808Kを実行してください。 私が試してみました:エスコス-phpのプリンタ接続エラー
1.
$connector = new FilePrintConnector("\\Sah-it\ARP-808K");
$printer = new Printer($connector);
2.
$profile = CapabilityProfile::load("simple");
$connector = new WindowsPrintConnector("smb://Sah-it/ARP-808Kr");
$printer = new Printer($connector, $profile);
3.
$connector = new NetworkPrintConnector("\\Sah-it\ARP-808K");
$printer = new Printer($connector);
すべては私に接続エラーが発生します。親切に私はプリンタに接続するのに役立ちます。おかげ
FIG1:
FIG2:私は個人的にESC/POS Print Driver for PHPライブラリを使用していませんでしたが、ドキュメントはかなり詳細な方法で使用を述べるい
1. 警告:コピー(\\ Sah-it \ ARP-808K):ストリームのオープンに失敗しました:C:\ wamp \ www \ p \ vendor \ mike42 \ escpos-phpの権限が拒否されました。 \ src \ Mike42 \ Escpos \ PrintConnectors \ WindowsPrintConnector.php on line 372 2. 致命的なエラー:C:\ wamp \ www \ p \ vendor \ mike42の「ファイルをプリンタにコピーできませんでした\エスケープ-php \ src \ Mike42 \ Escpos \ PrintConnectors \ WindowsPrintConnector.php on line 290 3. 例外:C:\ wamp \ www \ p \ vendor \ mike42 \ escpos-php \ srcのファイルをプリンタにコピーできませんでした\ Mike42 \ Escpos \ PrintConnectors \ WindowsPrintConnector.php on line 291 –
この問題をGithubで確認してください:https://github.com/mike42/escpos-php/issues/67 – Kitson88
goeプリンタ接続のデバッグを行います。また、これは明らかにあなたのWAMPサーバーからプリンタへの接続の問題であるように、IPとポート経由で試してみてください。 – Kitson88