本文整理汇总了PHP中uc_unserialize函数的典型用法代码示例。如果您正苦于以下问题:PHP uc_unserialize函数的具体用法?PHP uc_unserialize怎么用?PHP uc_unserialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uc_unserialize函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onls
function onls()
{
$applist = $_ENV['app']->get_apps('appid, type, name, url, tagtemplates');
$applist2 = array();
foreach ($applist as $key => $app) {
$app['tagtemplates'] = uc_unserialize($app['tagtemplates']);
$applist2[$app['appid']] = $app;
}
return $applist2;
}
示例2: updatedata
function updatedata($appid, $data)
{
$appid = intval($appid);
$data = uc_unserialize($data);
$this->base->load('app');
$data[0] = addslashes($data[0]);
$datanew = array();
if (is_array($data[1])) {
foreach ($data[1] as $r) {
$datanew[] = $_ENV['misc']->array2string($r);
}
}
$tmp = $_ENV['app']->get_apps('type', "appid='{$appid}'");
$datanew = addslashes($tmp[0]['type'] . "\t" . implode("\t", $datanew));
if (!empty($data[0])) {
$return = $this->db->result_first("SELECT count(*) FROM " . UC_DBTABLEPRE . "tags WHERE tagname='{$data['0']}' AND appid='{$appid}'");
if ($return) {
$this->db->query("UPDATE " . UC_DBTABLEPRE . "tags SET data='{$datanew}', expiration='" . $this->base->time . "' WHERE tagname='{$data['0']}' AND appid='{$appid}'");
} else {
$this->db->query("INSERT INTO " . UC_DBTABLEPRE . "tags (tagname, appid, data, expiration) VALUES ('{$data['0']}', '{$appid}', '{$datanew}', '" . $this->base->time . "')");
}
}
}
示例3: uc_check_version
function uc_check_version()
{
$return = uc_api_post('version', 'check', array());
$data = uc_unserialize($return);
return is_array($data) ? $data : $return;
}
示例4: unserialize
function unserialize($s)
{
return uc_unserialize($s);
}
示例5: uc_get_list
function uc_get_list($page, $ppp, $totalnum, $sqladd = '')
{
$return = call_user_func(UC_API_FUNC, 'user', 'get_list', array('page' => $page, 'ppp' => $ppp, 'totalnum' => $totalnum, 'sqladd' => $sqladd));
return UC_CONNECT == 'mysql' ? $return : uc_unserialize($return);
}
示例6: uc_tag_get
function uc_tag_get($tagname, $nums = 0)
{
$return = call_user_func(UC_API_FUNC, 'tag', 'gettag', array('tagname' => $tagname, 'nums' => $nums));
return UC_CONNECT == 'mysql' ? $return : uc_unserialize($return);
}
示例7: error_reporting
}
if (!defined('IN_UC')) {
error_reporting(0);
require_once ROOT_PATH . 'uc_client/config.inc.php';
require_once ROOT_PATH . 'uc_client/client.php';
$code = @$_GET['code'];
parse_str(uc_authcode($code, 'DECODE', UC_KEY), $get);
$timestamp = time();
if ($timestamp - $get['time'] > 3600) {
exit('Authracation has expiried');
}
if (empty($get)) {
exit('Invalid Request');
}
$action = $get['action'];
$post = uc_unserialize(file_get_contents('php://input'));
if (in_array($get['action'], array('test', 'updatebadwords', 'updatehosts', 'updateapps', 'updateclient', 'synlogin', 'synlogout'))) {
$uc_note = new uc_note();
exit($uc_note->{$get}['action']($get, $post));
} else {
exit(API_RETURN_FAILED);
}
} else {
exit;
}
class uc_note
{
var $db = '';
var $tablepre = '';
function _serialize($arr, $htmlon = 0)
{
示例8: uc_check_admin
function uc_check_admin($username)
{
$return = call_user_func(UC_API_FUNC, 'user', 'check_admin', array('username' => $username));
return UC_CONNECT == 'mysql' ? $return : uc_unserialize($return);
}
示例9: updateapps
/**
* 当 UCenter 的应用程序列表变更时,此接口负责通知所有应用程序更新后的应用程序列表。
* @param type $get
* @param type $post
*/
protected function updateapps($get, $post)
{
$post = uc_unserialize(file_get_contents('php://input'));
$cachefile = DISCUZ_ROOT . './uc_client/data/cache/apps.php';
$fp = fopen($cachefile, 'w');
$s = "<?php\r\n";
$s .= '$_CACHE[\'apps\'] = ' . var_export($post, TRUE) . ";\r\n";
fwrite($fp, $s);
fclose($fp);
return API_RETURN_SUCCEED;
}
示例10: uc_user_count
function uc_user_count($filter)
{
$return = call_user_func(UC_API_FUNC, 'user', 'user_count', array('filter' => $filter));
return UC_CONNECT == 'mysql' ? $return : uc_unserialize($return);
}