当前位置: 首页>>代码示例>>PHP>>正文


PHP Support::getServerURI方法代码示例

本文整理汇总了PHP中Support::getServerURI方法的典型用法代码示例。如果您正苦于以下问题:PHP Support::getServerURI方法的具体用法?PHP Support::getServerURI怎么用?PHP Support::getServerURI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Support的用法示例。


在下文中一共展示了Support::getServerURI方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fatal

    } else {
        fatal('Another instance of the script is still running for the specified account. ', "If this is not accurate, you may fix it by running this script with 'fix-lock=1'", "in the query string or you may unlock ALL accounts by running this script with 'fix-lock=1'", 'as the only parameter.');
    }
    exit;
}
// clear the lock in all cases of termination
function cleanup_lock()
{
    global $account_id;
    Lock::release('download_emails_' . $account_id);
}
register_shutdown_function('cleanup_lock');
$account = Email_Account::getDetails($account_id);
$mbox = Support::connectEmailServer($account);
if ($mbox == false) {
    $uri = Support::getServerURI($account);
    $login = $account['ema_username'];
    $error = imap_last_error();
    fatal("{$error}\n", "Could not connect to the email server '{$uri}' with login: '{$login}'.", 'Please verify your email account settings and try again.');
}
// if we only want new emails
if ($account['ema_get_only_new']) {
    $new_emails = Support::getNewEmails($mbox);
    foreach ($new_emails as $new_email) {
        Support::getEmailInfo($mbox, $account, $new_email);
    }
} else {
    $total_emails = Support::getTotalEmails($mbox);
    if ($total_emails > 0) {
        for ($i = 1; $i <= $total_emails; $i++) {
            Support::getEmailInfo($mbox, $account, $i);
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:download_emails.php

示例2: connectEmailServer

 /**
  * Method used to connect to the provided email server.
  *
  * @access  public
  * @param   array $info The email server information
  * @return  resource The email server connection
  */
 function connectEmailServer($info)
 {
     $mbox = @imap_open(Support::getServerURI($info), $info['ema_username'], $info['ema_password']);
     if ($mbox === FALSE) {
         $errors = @imap_errors();
         if (strstr(strtolower($errors[0]), 'certificate failure')) {
             $mbox = @imap_open(Support::getServerURI($info, TRUE), $info['ema_username'], $info['ema_password']);
         } else {
             Error_Handler::logError('Error while connecting to the email server - ' . $errors[0], __FILE__, __LINE__);
         }
     }
     return $mbox;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:20,代码来源:class.support.php


注:本文中的Support::getServerURI方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。