Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我看了一下,它给出的第一个链接是 http://php.net/manual/en/function.printer-list.php
但是它确实声明它适用于连接到服务器的打印机。如果我想获得客户机器上的打印机型号怎么办?这可以用PHP吗?
谢谢。
PHP 不可能,Javascript 也不可能。我想象的唯一方法是嵌入您网站的 Java 小程序。
PHP 在服务器端运行,因此无法访问连接到客户端计算机的设备。你可能会在 Javascript 中找到一些东西(虽然我不认为它可以做到这一点......)
正如其他人所说,不可能。但是,为什么不让访问者在打印时选择打印机呢?