我有以下执行命令:
/usr/local/bin/pdf2swf -s centerx=1 -s bitmap -s jpegquality=85 -s zoomtowidth=1200 -s zoomtoheight=1000 -s zoom=100 -s framerate=0.25 -s subpixels=1.5 -S /test.pdf -o /test-%.swf
当我通过ssh(例如putty)运行它时效果很好。 但是当我通过php脚本运行它时如下:
<?php
exec("/usr/local/bin/pdf2swf -s centerx=1 -s bitmap -s jpegquality=85 -s zoomtowidth=1200 -s zoomtoheight=1000 -s zoom=100 -s framerate=0.25 -s subpixels=1.5 -S /test.pdf -o /test-%.swf");
?>
它不起作用...... 请帮帮我,非常感谢你!
答案 0 :(得分:0)
您可以尝试phpseclib, a pure PHP SSH implementation。例如:
<?php
include('Net/SSH2.php');
$ssh = new Net_SSH2('www.domain.tld');
if (!$ssh->login('username', 'password')) {
exit('Login Failed');
}
echo $ssh->exec('pwd');
echo $ssh->exec('ls -la');
?>