【问题标题】:getting error message PHP Fatal error: Call to undefined method Zend_Mail_Storage_Imap::requestAndResponse()收到错误消息 PHP 致命错误:调用未定义的方法 Zend_Mail_Storage_Imap::requestAndResponse()
【发布时间】:2012-09-25 05:48:10
【问题描述】:

我是 Zend 框架的新手。我正在开发一个应用程序,通过使用该类(我添加到Zend/Mail/Storage/Imap.php)来搜索 Gmail 收件箱

/**
 * do a search request
 *
 * This method is currently marked as internal as the API might change and is not
 * safe if you don't take precautions.
 *
 * @internal
 * @return array message ids
 */
public function search(array $params)
{
    $response = $this->requestAndResponse('SEARCH', $params);
    if (!$response) {
        return $response;
    }

    foreach ($response as $ids) {
        if ($ids[0] == 'SEARCH') {
            array_shift($ids);
            return $ids;
        }
    }
    return array();
}

我这样称呼它:

$searchresults = $storage->search(array('search_terms'));

但每次我尝试运行它时,它都会显示错误:

PHP 致命错误:在第 655 行调用 /public_html/test06/Zend/Mail/Storage/Imap.php 中未定义的方法 Zend_Mail_Storage_Imap::requestAndResponse()

【问题讨论】:

标签: php zend-framework zend-mail


【解决方案1】:

似乎 requestAndResponse 没有以您调用它的方式定义。我不使用 ZF,但您确定 requestAndResponse 接受您发送的 2 参数。我的意思是 ('SEARCH', $params)。

【讨论】:

    猜你喜欢
    • 2018-04-04
    • 2015-05-13
    • 1970-01-01
    • 2013-06-02
    • 2011-07-17
    • 2015-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多