是否可以使用PHP打印文件 [英] Is it possible to print files using PHP

查看:78
本文介绍了是否可以使用PHP打印文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以使用 PHP 编写文件,但我想知道是否可以在 Windows 机器上将这些文件直接打印到打印机.是否有任何预先构建的函数来执行此操作?

I know you can write files using PHP, but I was wondering if it was possible to print these files directly to a printer, on a Windows machine. Are there any pre-built functions to do this?

顺便说一下,我在本地主机上

I'm on localhost by the way

推荐答案

如果您问是否可以从服务器打印到服务器碰巧连接到的机器,那么答案是,.(使用 CUPS 可以让 this 在 Linux/Mac 上工作.

If you are asking about whether it is possible to print from the server to a machine the server happens to connect to, then the answer is, Yes. (With CUPS it is possible to get this working with Linux/Mac).

如果您想在用户的打印机上打印一些东西,您需要使用 JavaScript

If you're trying to get something to print on a user's printer, you will need to use JavaScript

这篇关于是否可以使用PHP打印文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆