= 4.2.0, PHP 5, PHP 7, PHP 8)openssl_pkey_export_to_file — 將密鑰導出到文件中 說明openssl_pkey_export_to_file( mixed $key, ">
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
openssl_pkey_export_to_file — 將密鑰導出到文件中
$key,$outfilename,$passphrase = ?,$configargs = ?
openssl_pkey_export_to_file() 將 ascii 格式
(PEM編碼)的 key 保存到名為outfilename文件中。
注意: 必須安裝有效的 openssl.cnf 以保證此函數(shù)正確運行。參考有關安裝的說明以獲得更多信息。
key
outfilename輸出文件的路徑。
passphrase
密鑰可以通過值為passphrase的密碼來保護。
configargs
configargs 可以用來調(diào)整導出流程,通過指定或者覆蓋openssl配置文件選項。參見 openssl_csr_new() 獲取更多關于 configargs 的信息。
成功時返回 true, 或者在失敗時返回 false。