array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.openssl-error-string.php', 1 => 'openssl_error_string', ), 'up' => array ( 0 => 'ref.openssl.php', 1 => 'OpenSSL 関数', ), 'prev' => array ( 0 => 'function.openssl-encrypt.php', 1 => 'openssl_encrypt', ), 'next' => array ( 0 => 'function.openssl-free-key.php', 1 => 'openssl_free_key', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/openssl/functions/openssl-error-string.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)
openssl_error_string — OpenSSL エラーメッセージを返す
openssl_error_string() は、 OpenSSL ライブラリから直近のエラーを返します。 エラーメッセージはキューに格納されるので、 すべての情報を集めるにはこの関数を複数回コールする必要があります。 最後のエラーが、いちばん最近に発生したエラーとなります。
この関数にはパラメータはありません。
エラーメッセージ文字列を返します。
エラーメッセージがもうない場合は、false
を返します。
例1 openssl_error_string() の例
<?php
// ここで、処理に失敗する OpenSSL 関数をコールしたと仮定します
while ($msg = openssl_error_string())
echo $msg . "<br />\n";
?>