运行 Python 脚本从 php 启动时 python 脚本存储在 raspberrypi 上,而不是在我安装 php 脚本的同一台计算机上?

Run Python script at start-up from php when python script is stored on a raspberrypi not in the same computer I have my php script on?

我正在使用条码 reader 通过 python 脚本连接到 raspberrypi 来读取条码并通过包含 file.php 的 ip 将它们发送到 php 中进行处理] 在 python.

我的 python 脚本与 PHP 脚本在不同的物理机器上。

我想从 php 代码启动 python 脚本,使用户能够自动扫描条形码。

**我是python的新手,之前没用过。

您必须 运行 您的 Python 作为守护程序,并使用套接字或 REST 调用

通过 PHP 联系 Python