Warning: openssl_pkcs7_sign(): error getting private key using WAMP

浪尽此生 提交于 2019-12-01 06:29:17

I think file:// is not correct. You fetch die real path with dirname(__FILE__) that should be enough. So i prefer:

$certificate = __DIR__'/../tcpdf.crt';

__DIR__ or dirname(FILE) is the path to the file you've in. To you can go back with /../../ to your file depends on your folder location for your certificate files.

You need the 'file://' prefix and the realpath to file:

//in your case
$certificate = 'file://'.realpath('../tcpdf.crt');
// OR for other cases
$certificate = 'file://'.realpath('/tcpdf.crt');
// OR
$certificate = 'file://'.realpath('C:/tcpdf.crt');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!