2017-07-28 32 views
0

我已經有很多時間使用PHP,但我遇到了與票據打印有關的項目和真相有沒有很多相關的圖書館和我發現那是所謂的邁克42是給我很多問題,在庫中的例子,然後繼續與應用程序。問題是,沒有太多的文檔與可能造成的錯誤相關。Php錯誤與庫邁克42

我遇到的錯誤信息是:

警告:複製(\ Luis_Enrique \ EPSON TM-T20收據):未能打開流:在C無這樣的文件或目錄:\瓦帕\ WWW \ Probar_Ticket \ SRC \ Mike42 \ Escpos \ PrintConnectors \ WindowsPrintConnector.php上線372

這裏是我的代碼:

require __DIR__ . '/../autoload.php'; 
use Mike42\Escpos\Printer; 
use Mike42\Escpos\PrintConnectors\FilePrintConnector; 
use Mike42\Escpos\PrintConnectors\CupsPrintConnector; 
use Mike42\Escpos\PrintConnectors\WindowsPrintConnector; 


// Enter the device file for your USB printer here 
try { 
    /* add to the printer */ 
    $connector = new WindowsPrintConnector("EPSON TM-T20 Receipt"); 

    $printer = new Printer($connector); 
    /* write */ 
    $printer->text("Hola Mundo!\n"); 
    /* Cut tiket */ 
    $printer->cut(); 
    /* Close printer */ 
    $printer->close(); 
} catch (Exception $e) { 
    echo "Couldn't print to this printer: " . $e->getMessage() . "\n"; 
} 

的錯誤不是如果是在代碼中,在wampse需要特定許可或者試圖使打印機與圖書館沒有可比性,並且我認爲圖書館缺乏大量文檔。或者不知道他們是否知道其他圖書館。?

回答