English 中文(简体)
PHP: 印刷
原标题:PHP to print using dot-matrix printers

我正在实施一项项目,将结束印刷收据,我的客户使用一台打印机(一些旧版本)。 他需要一个系统,即收货打印将迅速,即时间效率,而不是打开方言箱和选择打印机......更长的打印机将通过网络共享。

主要问题是,所有这一切都应当使用购买力平价进行。 以下是一些解决办法。

  • Design a php script to write data to a text file then print the text file using a remote printer

- 问题在于,我很难从PHP中抽取服务器。 从逻辑上看,这似乎是行之有效的。

平台 ===> WIN XP

打印机 ===>N/WLAN的主要服务器

问题回答

What s the intended workflow before the user hit s enter?
What s the make and model of printer? This is important so that we can see if it needs any fancy escape codes sent to it?
Usually if you re printing then it would be sent from the client machine.
If printing from the server the data needs to be either sent to the server or needs to already be there and accessible. Is it already there in a database? Or are you sending a webform?
You say RCPT, is this a receipt?

Okay, so if you have the text file created on the server you should be able to copy the text file to lpt1: or 2: or whatever device it s defined as. You need to know what the file s named as, or you could pass it on, but how about:

exec( c:WINDOWSsystem32cmd.exe /c START C:some_dirprint_me.bat );




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签