如何将数据从网页发送到串行端口? [英] How can I send data from a web page to a serial port?

查看:50
本文介绍了如何将数据从网页发送到串行端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含基本内容的网页.我可以尝试它的格式,但现在是 PHP.我想将此数据发送到我计算机的一个串行端口(作为 PHP 页面的访问者).

I have a web page which includes a basic content. I can chance its format but it is PHP now. I want to send this data to one of the serial ports of my computer (as a visitor of PHP page).

我需要一个用于将此数据从 Internet 传输到其中一个串行端口的代码.它可以是 C++、javascript、C# 或其他任何东西.

I need a code for transferring this data from internet to one of the serial-ports. It can be C++, javascript, C# or anything else.

我正在使用 Windows(作为网页的访问者).所以,我需要将数据发送到访问者计算机的串行端口而不是服务器的.不需要阅读.

I am using Windows (as a visitor of web page). So, I need to send datas to serial port of visitor's computer not server's. Reading is not necessary.

哪个程序和流程是正确执行此操作的最佳选择?我需要它们工作得很好的示例代码部分!

Which program and process is the best option to do this properly? I need example code parts that they work just fine!

推荐答案

有一个PHP库支持写入串口.

There is a library for PHP that supports writing to serial port.

请参阅此处.

更多:

http://php.net/manual/en/function.fopen.php#20935

有关更多讨论,请参阅此问题:如何在 PHP 中读取 RS232 串口喜欢这个 QBasic 程序

See this question for more discussion: How to Read RS232 Serial Port in PHP like this QBasic Program

更新:

要在 Windows 上执行此操作,请参阅本教程:http://blog.950buy.com/article/php-use-rs232-serial-communication-to-send-file/

To do this on windows see this tutorial: http://blog.950buy.com/article/php-use-rs232-serial-communication-to-send-file/

还有这个问题:Serial comm with PHP on Windows

这篇关于如何将数据从网页发送到串行端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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