openssl_pkcs12_read(file_get_contents("xxx.pfx"), $cert, "123456");
其中123456是密码,需按照实际填写,$cert为读取结果
结果中的private部分是私钥