array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.gnupg-geterror.php', 1 => 'gnupg_geterror', 2 => 'Returns the errortext, if a function fails', ), 'up' => array ( 0 => 'ref.gnupg.php', 1 => 'GnuPG 函数', ), 'prev' => array ( 0 => 'function.gnupg-getengineinfo.php', 1 => 'gnupg_getengineinfo', ), 'next' => array ( 0 => 'function.gnupg-geterrorinfo.php', 1 => 'gnupg_geterrorinfo', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/gnupg/functions/gnupg-geterror.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

gnupg_geterror

(PECL gnupg >= 0.1)

gnupg_geterrorReturns the errortext, if a function fails

说明

gnupg_geterror(resource $identifier): string|false

参数

identifier

gnupg 标识符,由对 gnupg_init()gnupg 的调用生成。

返回值

Returns an errortext, if an error has occurred, otherwise false.

示例

示例 #1 Procedural gnupg_geterror() example

<?php
$res
= gnupg_init();
echo
gnupg_geterror($res);
?>

示例 #2 OO gnupg_geterror() example

<?php
$gpg
= new gnupg();
echo
$gpg->geterror();
?>