0

我有使用 SSH 的 tesseract,但是当我在 PHP 中使用它时它不起作用。我的 PHP 配置为能够执行 CL。

exec('tesseract /fullpath/to/document.png /fullpath/to/output');

我将 CL 与 IM/GS 等一起使用,效果很好。我不明白为什么这会因为 tesseract 的命令而失败。有任何想法吗?

4

1 回答 1

0

这是一个许可问题。我使用了http://phpseclib.sourceforge.net/这对我来说是最快和最简单的方法。整个过程用了 30 秒。

include('sshlib/SSH2.php');
$ssh = new Net_SSH2('www.example.com');
if (!$ssh->login('user', 'pass')) {
    exit('Login Failed');
}
echo $ssh->exec('boom command works 2>&1');
于 2013-08-13T20:24:22.390 回答