Jump to content

siric

Members
  • Posts

    116
  • Joined

  • Last visited

Everything posted by siric

  1. You create a port in Windows which is mapped to the USB port - in my case named Terow. You then create your text file and copy it to the port. $file = "print.txt"; $handle = fopen($file, 'w'); $linefeed = chr(10); $Data = "This is a test\n"; $Data .= "\n"; $Data .= "Line 1"; $Data .= "\n"; $Data .= "Line 2"; $Data .= $linefeed; $Data .= $linefeed; fwrite($handle, $Data); fclose($handle); copy($file, "//localhost/terow"); If I do the same with an image, as expected it prints junk. Can't find information on how to convert the image file to data that will be accepted by the printer.
  2. I am trying to print an image to a thermal POS printer from a PHP script. I have managed to get a text file to print by saving it to a file and copying to the USB port and that works fine. Am running PHP on Windows. Would appreciate any assistance. Thanks Steve
  3. Never mind. WAY too early in the morning. Config.inc.php was being called but I had an typo in the database selection string.
  4. Hello, I have the following code (which opens a database connection and then links to a table.) include("config.inc.php"); at the beginning of a script, but the file (which exists in the same directory as the script) is not being called. I have verified that the file is there and that the spelling is correct (there is no complaint for PHP not being able to read the file) Since it is not being read, the mysql search is not working. If I copy the lines from the config.inc.php file to this file, everything works. I have tried using the full directory structure to no avail. Any ideas? Thanks Steve
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.