【问题标题】:php code error Warning: Declaration of Digital_Signature::CreateSign()php 代码错误警告:声明 Digital_Signature::CreateSign()
【发布时间】:2017-12-04 20:38:57
【问题描述】:
 function CreateSign()
{
$rsa_obj = new Crypt_RSA(array('private_key' => $this->_privateKey));
$this->check_error($rsa_obj);
return $rsa_obj->createSign($this->_document);
}

这段代码显示这个错误

Warning: Declaration of Digital_Signature::CreateSign() should be compatible with Crypt_RSA::createSign($document, $private_key = NULL, $hash_func = NULL) in /var/www/html/shares/digital_signature.php on line 49

谁能帮忙

【问题讨论】:

  • pear.php.net/package/Crypt_RSA 已被废弃多年。 phpseclib 是推荐的替代方案。
  • 我有旧的网络程序,转移到新的服务器,但无法运行这个程序

标签: php rsa pear


【解决方案1】:

父类和子类中的函数应该有相同的参数,它们的参数也应该有相同的默认值

【讨论】:

    猜你喜欢
    • 2015-08-21
    • 2015-07-29
    • 2010-09-07
    • 2020-09-19
    • 1970-01-01
    • 1970-01-01
    • 2011-02-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多