php: openssl_public_encrypt()和openssl_private_encrypt()返回值总是FALSE
--------------------php code--------------
$crtpath = $mailInfors['dir']['certdir'].$crtname;
$crt = $referen->getFileContent($crtpath);
openssl_get_publickey($crt);
echo "crt-->>$crt
";
openssl_public_encrypt($_POST['sendContent'],$chrtext,$crtpath);
-----------变量详细信息---------
content-->>ascas
crtname-->>wxd.crt
crtpath-->>/usr/nc-home/webpost/mailbox/d00/1/y/u/yushuai.niu/.user/certkey/wxd.crt
------------warning--------------
Warning: openssl_public_encrypt(): key parameter is not a valid public key in ...
求解!
------解决方案--------------------
看它的提示很明显 key错了
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号