【问题标题】:Process php : Scanimage -L (usb)处理 php : Scanimage -L (usb)
【发布时间】:2018-07-16 16:01:13
【问题描述】:

我在我的项目 PHP 中创建了一个进程,用于使用 scanimage 命令行显示所有设备,但该进程的输出是空的,不在终端中:

  • 终端结果: 扫描图像-L | grep -v "ip=" 设备 `fujitsu:fi-6130dj:105613' 是 FUJITSU fi-6130dj 扫描仪
  • IResult 在进程 php 字符串(0)""

自从 grep 我有:

  • 终端结果: 扫描图像 -L 设备fujitsu:fi-6130dj:105613' is a FUJITSU fi-6130dj scanner devicehpaio:/net/HP_LaserJet_400_colorMFP_M475dw?ip=192.168.121.121'是惠普HP_LaserJet_400_colorMFP_M475dw一体机

  • 处理中的结果: 设备 `hpaio:/net/HP_LaserJet_400_colorMFP_M475dw?ip=192.168.121.121' 是惠普 HP_LaserJet_400_colorMFP_M475dw 一体机*

问题仅出在 USB 设备上。

【问题讨论】:

    标签: php process usb scanning


    【解决方案1】:

    sudo visudo(并添加 www-data ALL=(ALL) NOPASSWD: /usr/bin/scanimage )

    它的工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-07
      • 1970-01-01
      • 1970-01-01
      • 2013-09-30
      • 1970-01-01
      相关资源
      最近更新 更多