2024 年日本 PHP 研討會

openssl_x509_export_to_file

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

openssl_x509_export_to_file將憑證匯出到檔案

說明

openssl_x509_export_to_file(OpenSSLCertificate|字串 $certificate, 字串 $output_filename, 布林值 $no_text = true): 布林值

openssl_x509_export_to_file()certificatePEM 編碼格式儲存到名為 output_filename 的檔案中。

參數

x509

請參閱 金鑰/憑證參數 以取得有效值的列表。

output_filename

輸出檔案的路徑。

no_text

可選參數 notext 會影響輸出的詳細程度;如果它是 false,則輸出中會包含額外的人類可讀資訊。 notext 的預設值為 true

返回值

成功時返回 true,失敗時返回 false

更新日誌

版本 說明
8.0.0 certificate 現在接受 OpenSSLCertificate 實例;先前接受類型為 OpenSSL X.509資源
新增註記

使用者提供的註記

此頁面沒有使用者提供的註記。
To Top