我有以下的execute命令:
/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");
?>它不工作了..。请帮帮我,非常感谢!
发布于 2011-10-17 07:24:29
你可以试试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');
?>https://stackoverflow.com/questions/7783869
复制相似问题