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


PHP Encryption::unserializeFromFile方法代码示例

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


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

示例1: __construct

 private function __construct()
 {
     $this->m_target_file = tmpDir('targets.targets');
     if (!file_exists($this->m_target_file)) {
         $this->m_target_set = array();
         return;
     }
     $this->m_target_set = Encryption::unserializeFromFile($this->m_target_file);
 }
开发者ID:snowleopardw,项目名称:Tw2other,代码行数:9,代码来源:TargetSet.php

示例2: initOAuth

 public function initOAuth()
 {
     $this->m_token = Encryption::unserializeFromFile(tmpDir('sina.oauth'));
     if ($this->m_token['auth_timestamp'] + $this->m_token['expires_in'] < time() - 10) {
         $this->reflashToken();
         $this->m_token = Encryption::unserializeFromFile(tmpDir('sina.oauth'));
     }
     if ($this->m_token['auth_timestamp'] + $this->m_token['expires_in'] >= time()) {
         $this->m_oauth = new SaeTClientV2($this->m_cfg['key'], $this->m_cfg['secret'], $this->m_token['access_token']);
     }
 }
开发者ID:snowleopardw,项目名称:Tw2other,代码行数:11,代码来源:Sync.php

示例3: __construct

 public function __construct($cfg)
 {
     $this->m_cfg = $cfg;
     $this->m_filters = array(array($this, 'ftForceSync'), array($this, 'ftForceNSync'), array($this, 'ftLevel'));
     $this->m_after_filters = array();
     $this->m_info_file = tmpDir($this->m_source_type . '.info');
     $this->m_token_file = tmpDir($this->m_source_type . '.oauth');
     if (!file_exists($this->m_token_file)) {
         throw new TOException(_er('E_SOURCE_FILE_NOT_EXISTS', $this->m_info_file, $this->m_token_file));
         return;
     }
     if (file_exists($this->m_info_file)) {
         //$this->m_info  = Encryption::unserializeFromFile  ( $this->m_info_file );
         $this->m_info = unserialize(file_get_contents($this->m_info_file));
     }
     $this->m_token = Encryption::unserializeFromFile($this->m_token_file);
 }
开发者ID:snowleopardw,项目名称:Tw2other,代码行数:17,代码来源:SourceBase.php

示例4: display

<?php

/**
 * *********************************************************
 * 
 * @author cluries
 * @link http://cdbit.com
 * @version 1.0
 * @copyright 2012 http://cdbit.com All rights reserved
 * 
 * *********************************************************
 */
if (islocked('sina')) {
    $takedToken = Encryption::unserializeFromFile(tmpDir('sina.oauth'));
    if (!($takedToken['auth_timestamp'] + $takedToken['expires_in'] < time() - 10)) {
        display(_er('E_LOCKED', 'sina', 'sina'), 0);
    }
}
import('/library/saetv2.ex.class.php');
global $cfg_sina;
$o = new SaeTOAuthV2($cfg_sina['key'], $cfg_sina['secret']);
if (!isset($_REQUEST['code'])) {
    display('sina认证失败');
}
$keys = array();
$keys['code'] = $_REQUEST['code'];
$keys['redirect_uri'] = callbackUrl('sina');
$token = false;
try {
    $token = $o->getAccessToken('code', $keys);
} catch (OAuthException $e) {
开发者ID:snowleopardw,项目名称:Tw2other,代码行数:31,代码来源:sinaCallbackAction.php


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