php shell 命令,PHP shell执行命令

我正在使用Windows应用程序tesseract,长话短说,这是一个通过命令运行的OCR应用程序。PHP shell执行命令

tesseract text.png out

它实际上得到的图像输出到文本文件out.txt

我甚至改变了目录,并为:

安装我用命令来测试和使用这条线工作正常的应用程序后无处不在。

现在使用PHP,当我使用的代码如下问题就来了:

echo exec("tesseract text.png out 2>&1", $output);

var_dump($output);

而这个时候,而不是获取文件时,它说的Tesseract不认可!

这是输出:

operable program or batch file.

C:\wamp64\www\prestashop\ocr\ocr.php:12:

array (size=4)

0 => string '' (length=0)

1 => string 'C:\wamp64\www\prestashop\ocr>tesseract text.png out' (length=51)

2 => string ''tesseract' is not recognized as an internal or external command,' (length=65)

3 => string 'operable program or batch file.' (length=31)

谁能帮我请!?

谢谢

2016-07-28

Combinu

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值