• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP mb_unserialize函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中mb_unserialize函数的典型用法代码示例。如果您正苦于以下问题:PHP mb_unserialize函数的具体用法?PHP mb_unserialize怎么用?PHP mb_unserialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get

 function get($args = array(), $page_id = 0)
 {
     if (!$this->_check_args($args, $page_id)) {
         return false;
     }
     if (is_array($args[0])) {
         $key = array_shift($args[0]);
         if (count($args[0]) == 0) {
             array_shift($args);
         }
     } else {
         $key = is_array($args) ? array_shift($args) : $args;
     }
     /*
      * There was a PHP notice on the line #35 of array to string conversion ($key was an array). It was impossible to me (Luka) to figure out the what 
      * would the correct thing to do is. The issue was with feature_area/optin(2)
      */
     if (is_array($key)) {
         $key = $key[0];
     }
     $name = '_' . OP_SN . '_' . $key;
     if (!isset($this->_options[$name])) {
         if ($page_id == 0) {
             $page_id = $this->_page_id;
         }
         $temp = get_post_meta($page_id, $name, true);
         $this->_options[$name] = mb_unserialize($temp);
     }
     return _op_traverse_array($this->_options[$name], $args);
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:30,代码来源:page_options.php


示例2: callback

 function callback($data)
 {
     //	$request_data = get_post(NULL);
     $request_data = $data['request_data'];
     $return_data = json_decode($data['return_data']);
     $return_data = object_array($return_data);
     $CI =& get_instance();
     $CI->load->model('stream_model');
     $order_rs = $CI->stream_model->findByAttributes("order_bn = '" . $request_data['tid'] . "' and from_method='store.trade.reship.add'", 'stream_id desc');
     $reship_id = '';
     if ($order_rs) {
         $request_rs = mb_unserialize($order_rs['request_data']);
         $reship_id = $request_rs['reship_id'];
     }
     if ($return_data['rsp'] == 'succ') {
         //回调接口
         $callback_data = array();
         $callback_data['res'] = '';
         $callback_data['msg_id'] = $data['msg_id'];
         $callback_data['err_msg'] = '';
         $callback_data['data'] = json_encode(array('tid' => $request_data['tid'], 'reship_id' => $reship_id));
         $callback_data['sign'] = '';
         $callback_data['rsp'] = 'succ';
     } else {
         $callback_data = array();
         $callback_data['res'] = $return_data['res'];
         $callback_data['msg_id'] = $data['msg_id'];
         $callback_data['err_msg'] = '';
         $callback_data['data'] = json_encode(array('tid' => $request_data['tid'], 'reship_id' => $reship_id));
         $callback_data['sign'] = '';
         $callback_data['rsp'] = 'fail';
     }
     return array('callback_data' => $callback_data, 'callback_url' => $request_data['callback_url']);
 }
开发者ID:xingfuunit,项目名称:matrix,代码行数:34,代码来源:store_trade_aftersale_status_update.php


示例3: _get_callback_data

 function _get_callback_data($request_data, $response_data, $return_data, $form_certi, $stream_id)
 {
     //回调
     $form_certi = $this->certi_model->findByAttributes(array('certi_name' => $form_certi));
     //请求方
     $callback_list = array();
     $request_data = mb_unserialize($request_data);
     $method_name = str_replace('.', '_', $request_data['method']);
     $node_type = $request_data['node_type'] == 'ecos.b2c' ? 'erp_to_ec' : 'ec_to_erp';
     $filenames = get_filenames('application/libraries/apiv/' . $node_type);
     foreach ($filenames as $key2 => $value2) {
         if ($method_name . '.php' == $value2) {
             $this->load->library('apiv/' . $node_type . '/' . $method_name);
             if (method_exists($this->{$method_name}, 'callback')) {
                 //发送回调
                 $callback_rs = $this->{$method_name}->callback(array('request_data' => $request_data, 'return_data' => $return_data, 'response_data' => $response_data, 'msg_id' => md5($stream_id)));
                 $now = time();
                 $callback_data = $callback_rs['callback_data'];
                 $callback_url = $callback_rs['callback_url'];
                 $callback_data['matrix_certi'] = $form_certi['certi_name'];
                 $callback_data['matrix_timestamp'] = $now;
                 $callback_data['sign'] = md5($form_certi['certi_name'] . $form_certi['certi_key'] . $now);
                 $callback_data['stream_id'] = $stream_id;
                 //$return_callback = $this->httpclient->set_timeout(15)->post($rs['callback_url'],$callback_data);//回调发送
                 $callback_list = array('url' => $callback_url, 'method' => 'POST', 'post_data' => $callback_data, 'header' => null, 'options' => array());
             }
         }
     }
     return $callback_list;
 }
开发者ID:xingfuunit,项目名称:matrix,代码行数:30,代码来源:crontab_stream.php


示例4: load_from_resultset

 public function load_from_resultset($rs)
 {
     $main = $rs[0];
     $this->id = $main->id;
     $this->element = $main->element;
     $this->template = $main->template;
     $this->name = $main->name;
     $this->type = $main->type;
     $this->options = mb_unserialize($main->options);
     $this->dvalue = $main->dvalue;
     $this->multilanguage = $main->multilanguage;
     $this->helper = $main->helper;
     $this->width = $main->width;
     $this->position = $main->position;
     $this->enabled = $main->enabled;
     // decimal format extra fields
     $this->precision = $main->precision;
     $this->prefix = $main->prefix;
     $this->suffix = $main->suffix;
     if ($this->type == 'date') {
         $this->dvalue = core_ts2date($this->dvalue, false);
     } else {
         if ($this->type == 'datetime') {
             $this->dvalue = core_ts2date($this->dvalue, true);
         }
     }
 }
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:27,代码来源:property.class.php


示例5: get

 public function get($name)
 {
     $strCache = $this->find('cache', array('cachename' => $name), 'cachevalue', 'cacheid DESC');
     return mb_unserialize(substr($strCache['cachevalue'], 10));
     //if (! $result = array_pop ( $result )) return FALSE;
     // if( substr($result, 0, 10) < time() ){$this->del($name);return FALSE;}
     //return mb_unserialize ( substr ( $result, 10 ) );
 }
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:8,代码来源:tsMySqlCache.php


示例6: getInvoice

 public function getInvoice($id)
 {
     $row = $this->db()->row("\n            SELECT \n                bi.*,\n                u.uid,\n                u.login\n            FROM " . self::$_TABLE . " AS bi \n            INNER JOIN " . self::$_TABLE_USER . " AS u ON u.uid = bi.user_id\n            WHERE bi.id = ?i", $id);
     if ($row) {
         $row['fields'] = mb_unserialize($row['fields']);
     }
     return $row;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:8,代码来源:BillInvoicesModel.php


示例7: get_style

 public function get_style()
 {
     $model_setting = Model('setting');
     $list_setting = $model_setting->getListSetting();
     if ($list_setting['decoration_style'] != '') {
         $decoration_style = mb_unserialize($list_setting['decoration_style']);
     }
     $decoration_style = array_map("base64_decode", $decoration_style);
     return $decoration_style;
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:10,代码来源:decoration.model.php


示例8: select

 function select()
 {
     $result = $this->_performQuery('select');
     $array = array();
     foreach ($result as $row) {
         if (isset($row['file_array']) and !empty($row['file_array'])) {
             include_once 'functions/text_functions.php';
             $array[] = mb_unserialize($row['file_array']);
         }
     }
     return $array;
 }
开发者ID:a2call,项目名称:commsy,代码行数:12,代码来源:cs_file_multi_upload_manager.php


示例9: load_from_resultset

 public function load_from_resultset($rs)
 {
     $main = $rs[0];
     $this->id = $main->id;
     $this->website = $main->website;
     $this->title = $main->title;
     $this->file = $main->file;
     $this->sections = mb_unserialize($main->sections);
     $this->gallery = $main->gallery;
     $this->comments = $main->comments;
     $this->tags = $main->tags;
     $this->statistics = $main->statistics;
     $this->permission = $main->permission;
     $this->enabled = $main->enabled;
 }
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:15,代码来源:template.class.php


示例10: getReqv

 /**
  * Возвращает реквизиты заказчика из слепков
  * @return type
  */
 public function getReqv($emp_id = 0)
 {
     $fields = $this->db()->val("SELECT fields FROM {$this->TABLE} WHERE reserve_id = ?i", $this->reserve_id);
     if ($fields) {
         $reqv = mb_unserialize($fields);
     } elseif ($emp_id) {
         $reqvs = ReservesHelper::getInstance()->getUserReqvs($emp_id);
         if ($reqvs && $reqvs['form_type']) {
             $reqv = $reqvs[$reqvs['form_type']];
             $reqv['form_type'] = $reqvs['form_type'];
             $reqv['rez_type'] = $reqvs['rez_type'];
         }
     }
     return $reqv;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:19,代码来源:ReservesServiceReqvModel.php


示例11: getInvoice

 public function getInvoice($id)
 {
     $row = $this->db()->row('
         SELECT 
             bi.*,
             u.uid,
             u.login
         FROM ' . self::$_TABLE . ' AS bi 
         INNER JOIN ' . self::$_TABLE_USER . ' AS u ON u.uid = bi.user_id
         WHERE bi.id = ?i', $id);
     if ($row) {
         $row['fields'] = mb_unserialize($row['fields']);
     }
     return $row;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:15,代码来源:BillInvoicesModel.php


示例12: load_from_resultset

 public function load_from_resultset($rs)
 {
     global $theme;
     $main = $rs[0];
     $this->id = $main->id;
     $this->website = $main->website;
     $this->code = $main->code;
     $this->title = $main->title;
     $this->notes = $main->notes;
     // serialized (pre nv 2.1) or json object? (>= 2.1)
     // this compatibility fix will be removed in a future version!
     if (substr($main->blocks, 0, 2) == 'a:') {
         $this->blocks = mb_unserialize($main->blocks);
         for ($b = 0; $b < count($this->blocks); $b++) {
             if (is_numeric($this->blocks[$b])) {
                 $this->blocks[$b] = array("type" => "block", "id" => $this->blocks[$b]);
             } else {
                 if (!empty($this->blocks[$b])) {
                     // block group block or block type?
                     if (is_array($theme->block_groups)) {
                         foreach ($theme->block_groups as $key => $bg) {
                             for ($i = 0; $i < count($bg->blocks); $i++) {
                                 if ($bg->blocks[$i]->id == $this->blocks[$b]) {
                                     $this->blocks[$b] = array("type" => "block_group_block", "id" => $this->blocks[$b]);
                                 }
                             }
                         }
                     }
                     // final case, we assume it's a block type
                     if (!is_array($this->blocks[$b])) {
                         $this->blocks[$b] = array("type" => "block_type", "id" => $this->blocks[$b]);
                     }
                 }
             }
         }
     } else {
         $this->blocks = json_decode($main->blocks, true);
     }
 }
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:39,代码来源:block_group.class.php


示例13: load_from_resultset

 public function load_from_resultset($rs)
 {
     $main = $rs[0];
     $this->id = $main->id;
     $this->website = $main->website;
     $this->association = $main->association;
     $this->category = $main->category;
     $this->embedding = $main->embedding;
     $this->template = $main->template;
     $this->date_to_display = empty($main->date_to_display) ? '' : $main->date_to_display;
     $this->date_published = empty($main->date_published) ? '' : $main->date_published;
     $this->date_unpublish = empty($main->date_unpublish) ? '' : $main->date_unpublish;
     $this->date_created = $main->date_created;
     $this->date_modified = $main->date_modified;
     $this->galleries = mb_unserialize($main->galleries);
     $this->comments_enabled_to = $main->comments_enabled_to;
     $this->comments_moderator = $main->comments_moderator;
     $this->access = $main->access;
     $this->permission = $main->permission;
     $this->author = $main->author;
     $this->views = $main->views;
     $this->votes = $main->votes;
     $this->score = $main->score;
     $this->position = $main->position;
     $this->dictionary = webdictionary::load_element_strings('item', $this->id);
     $this->paths = path::loadElementPaths('item', $this->id);
     // to get the array of groups first we remove the "g" character
     $groups = str_replace('g', '', $main->groups);
     $this->groups = explode(',', $groups);
     if (!is_array($this->groups)) {
         $this->groups = array($groups);
     }
     if ($this->association == 'free') {
         $this->category = '';
     }
 }
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:36,代码来源:item.class.php


示例14: _buildItem

 /** Prepares the db_array for the item
  *
  * @param $db_array Contains the data from the database
  *
  * @return array Contains prepared data ( textfunctions applied etc. )
  */
 function _buildItem($db_array)
 {
     include_once 'functions/text_functions.php';
     $db_array['extras'] = mb_unserialize($db_array['extras']);
     return parent::_buildItem($db_array);
 }
开发者ID:a2call,项目名称:commsy,代码行数:12,代码来源:cs_material_manager.php


示例15: themo_import_post_meta

function themo_import_post_meta($postmeta, $post_id, $post)
{
    // Sometimes you want to import files from a source domain. If we do this, we need to replace the URL in the meta data.
    $find = "http://www.pixelglow.ro/themes/planuswp-v2.1/wp-content/uploads/";
    // Search url
    $upload_dir = wp_upload_dir();
    // Replace URL
    $replace = $upload_dir['baseurl'];
    // upload url of the local site.
    // Watch out for newlines inside of serialized data when importing from XML, they will break the import.
    // I've found that the XML leaves a discrepancy of how many chars are in the serialized string. I add 1 extra for each line break.
    $find2 = "\n";
    // look for newline
    $replace2 = "\n ";
    // replace newline + 1 extra char (Hack you say? Yes I am aware.)
    // Multidimensional array loop
    foreach ($postmeta as $key => $value) {
        foreach ($value as $sub_key => $sub_value) {
            // If this is serialized data we need to unserialize to find / replace.
            if (is_serialized($sub_value)) {
                $reserialize = true;
                $sub_value = str_replace($find2, $replace2, $sub_value);
                // Clean up
                $sub_value = mb_unserialize($sub_value);
                // unserialize
            } else {
                $reserialize = false;
            }
            $sub_value = str_replace($find, $replace, $sub_value);
            // Find / replace value 1
            if (is_array($sub_value)) {
                // We may nned to go even deeper...
                foreach ($sub_value as $sub_sub_key => $sub_sub_value) {
                    $sub_value[$sub_sub_key] = str_replace($find, $replace, $sub_sub_value);
                    // Find and replace value 1
                    $sub_value[$sub_sub_key] = str_replace($find2, $replace2, $sub_value[$sub_sub_key]);
                    // Find and replace value 2
                    if (is_array($sub_sub_value)) {
                        // We may nned to go even DEEPER..!
                        foreach ($sub_sub_value as $sub_sub_sub_key => $sub_sub_sub_value) {
                            $sub_value[$sub_sub_key][$sub_sub_sub_key] = str_replace($find, $replace, $sub_sub_sub_value);
                            // Find and replace value 1
                            $sub_value[$sub_sub_key][$sub_sub_sub_key] = str_replace($find2, $replace2, $sub_value[$sub_sub_key][$sub_sub_sub_key]);
                            // Find and replace value 2
                        }
                    }
                }
            }
            // If we unserialized then serialize back up again.
            if ($reserialize) {
                $value[$sub_key] = serialize($sub_value);
            } else {
                $value[$sub_key] = $sub_value;
            }
        }
        $postmeta[$key] = $value;
    }
    return $postmeta;
}
开发者ID:Brad--,项目名称:exigocorp,代码行数:59,代码来源:functions.php


示例16: backupDataFromXMLObject

 function backupDataFromXMLObject($xml_object)
 {
     $major_success = true;
     if (isset($xml_object) and !empty($xml_object)) {
         foreach ($xml_object->children() as $xml_item) {
             $data_array = array();
             foreach ($xml_item->children() as $xml_element) {
                 $value = utf8_decode((string) $xml_element);
                 if ($xml_element->getName() == 'extras') {
                     include_once 'functions/text_functions.php';
                     $value = mb_unserialize($value);
                 }
                 if (!empty($value)) {
                     $value = str_replace('lt_commsy_export', '<', $value);
                     $value = str_replace('gt_commsy_export', '>', $value);
                     $value = str_replace('and_commsy_export', '&', $value);
                     $data_array[$xml_element->getName()] = $value;
                 }
             }
             if (isset($data_array) and !empty($data_array)) {
                 $success = $this->_updateFromBackup($data_array);
                 $major_success = $major_success and $success;
             }
         }
     }
     return $major_success;
 }
开发者ID:a2call,项目名称:commsy,代码行数:27,代码来源:cs_link_father_manager.php


示例17: get

 /** get session item
  * this method returns a session item
  *
  * @param string session_id the session id
  *
  * @return object cs_session_item the session item
  */
 function get($session_id)
 {
     // don't delete session on every site request
     if (1 == rand(1, 100)) {
         $this->deleteOldSessions();
     }
     if (!empty($session_id) and !empty($this->_cache_object[$session_id])) {
         $session_item = $this->_cache_object[$session_id];
     } else {
         $session_arrays = array();
         $session_item = NULL;
         $query = 'SELECT session_value FROM session WHERE session_id="' . encode(AS_DB, $session_id) . '";';
         $this->_last_query = $query;
         $result = $this->_db_conntector->performQuery($query);
         if (!isset($result)) {
             include_once 'functions/error_functions.php';
             trigger_error('Problems selecting session values for: ' . $session_id . '.', E_USER_WARNING);
         } elseif (!empty($result[0])) {
             include_once 'classes/cs_session_item.php';
             $session_item = new cs_session_item();
             $session_item->setSessionID($session_id);
             $session = $result[0];
             if (!empty($session['session_value'])) {
                 if (strstr($session['session_value'], 'cs_mail_obj')) {
                     // must included here, because this objects could get out of the session
                     include_once 'classes/cs_mail_obj.php';
                 }
                 include_once 'functions/text_functions.php';
                 $session_array = mb_unserialize($session['session_value']);
             } else {
                 $session_array = array();
             }
             $session_item->_data = $session_array;
             if ($this->_cache_on) {
                 $this->_cache_object[$session_id] = $session_item;
             }
         }
     }
     return $session_item;
 }
开发者ID:a2call,项目名称:commsy,代码行数:47,代码来源:cs_session_manager.php


示例18: getFields

 public function getFields()
 {
     return mb_unserialize($this->_data['fields']);
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:4,代码来源:ReservesArchiveItemModel.php


示例19: Exception

try {
    $orderModel = TServiceOrderModel::model();
    $orderData = $orderModel->getCard($order_id, $uid);
    if (!$orderData || !$orderModel->isStatusEmpClose() || !$orderModel->isReserve()) {
        throw new Exception('None');
    }
    $reserveInstance = $orderModel->getReserve();
    if (!$reserveInstance->isAllowPayout($uid) || !$reserveInstance->isFrlAllowFinance()) {
        throw new Exception('Not isAllowPayout');
    }
    $reservesPayout = new ReservesPayoutTest();
    $reserve_id = $reserveInstance->getID();
    $reservesPayout->getPayoutReqv($reserve_id);
    $data_reqv = $reservesPayout->getPayoutReqv($reserve_id);
    if ($data_reqv) {
        $reqv = mb_unserialize($data_reqv['fields']);
        if ($reqv) {
            $type = $data_reqv['pay_type'];
            $reqv['skr_destinationCardSynonim'] = '246a784938d65740aa6cd175a179121c0cdef707_scn';
            $res = $reservesPayout->updateReqv($reserve_id, $reqv);
            var_dump($res);
            exit;
        }
    }
    /*
        $sum = $reserveInstance->getPayoutSum();
        
        $res = $reservesPayout->getUserReqvs($uid, $type, $sum);
        
        var_dump($res);
    */
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:po_reqv.php


示例20: getPayoutsInfo

 public function getPayoutsInfo()
 {
     require_once ABS_PATH . '/classes/reserves/ReservesPayout.php';
     $reservesPayout = new ReservesPayout();
     $payoutList = $reservesPayout->getPayouts($this->getID());
     if ($payoutList) {
         foreach ($payoutList as $key => $payoutItem) {
             $payoutList[$key]['price'] = tservices_helper::cost_format($payoutItem['price'], true);
             $payoutList[$key]['status_txt'] = self::$_payout_status_txt[$payoutItem['status']];
             $payoutList[$key]['error'] = $payoutItem['error'] == 0 ? 'нет' : $payoutItem['error'];
             $payoutList[$key]['date'] = date('d.m.Y H:i', strtotime($payoutItem['date']));
             $payoutList[$key]['last'] = $payoutItem['last'] ? date('d.m.Y H:i', strtotime($payoutItem['last'])) : ' — ';
             $payoutList[$key]['techmessage'] = $payoutList[$key]['techmessage'] ? $payoutList[$key]['techmessage'] : ' — ';
         }
     }
     $payoutReqv = $reservesPayout->getPayoutReqv($this->getID());
     if ($payoutReqv) {
         require_once ABS_PATH . '/classes/reserves/ReservesPayoutPopup.php';
         $payoutReqv['pay_type_txt'] = ReservesPayoutPopup::$payments_short_text[$payoutReqv['pay_type']];
         $payoutReqv['date'] = date('d.m.Y H:i', strtotime($payoutReqv['date']));
         $payoutReqv['last'] = $payoutReqv['last'] ? date('d.m.Y H:i', strtotime($payoutReqv['last'])) : ' — ';
         $payoutReqv['fields'] = mb_unserialize($payoutReqv['fields']);
         $payoutReqv['is_bank'] = $payoutReqv['pay_type'] == ReservesPayoutPopup::PAYMENT_TYPE_BANK;
         $payoutReqv['is_allow_change_status'] = $payoutReqv['is_bank'] && !$this->isStatusPayPayed();
     }
     $payoutLog = $reservesPayout->getErrorLog($this->getID());
     $payouts = array('list' => $payoutList, 'reqv' => $payoutReqv, 'log' => $payoutLog);
     return $payouts;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:29,代码来源:ReservesAdminOrderModel.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP mbstring_binary_safe_encoding函数代码示例发布时间:2022-05-15
下一篇:
PHP mb_ucfirst函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap