开发者

PGP encryption in PHP (Windows)

I'm having a problem with GPG encrpytion. Can you please help me with it?

It does not encrpyt the message that I want to encrp开发者_开发百科yt.

Code:

$pgppath = "C:/Program Files (x86)/GNU/GnuPG";
putenv("PGPPATH=$pgppath");
$cmd = "echo '$msg' | '$pgppath'/gpg2.exe -e";
exec($cmd, $encrypted, $errorCode);
echo implode("\n", $encrypted);
mail($to, $subject, $encrypted[0]);

Thanks! I appreciate the help!


Problem may be in '$pgppath'/gpg2.exe, it will be resolved to 'C:/Program Files (x86)/GNU/GnuPG'/gpg2.exe -e

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜