Написаны 2 функции
This commit is contained in:
parent
f507bc8283
commit
6508c70eb2
14
printlib.php
14
printlib.php
@ -4,9 +4,17 @@ define("MAX_STR", 32);
|
||||
define("ESC", "\x1b");
|
||||
define("GS", "\x1d");
|
||||
define("LF", "\x0a");
|
||||
define("PORT", "/dev/usb/lp0")
|
||||
function initprint() {}
|
||||
function println($data) {}
|
||||
define("PORT", "/dev/usb/lp0");
|
||||
function initprint() {
|
||||
return file_put_contents(PORT, ESC . "@");
|
||||
}
|
||||
function println($data) {
|
||||
if (strlen($data)<MAX_CHAR) {
|
||||
return file_put_contents(PORT, $data . LF);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function printcode39($data) {}
|
||||
function printcode128($data) {}
|
||||
function printean13($data) {}
|
||||
|
Loading…
Reference in New Issue
Block a user