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

PHP stripslashes_array函数代码示例

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

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



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

示例1: strip_request_slashes

function strip_request_slashes()
{
    $_COOKIE = stripslashes_array($_COOKIE);
    $_GET = stripslashes_array($_GET);
    $_POST = stripslashes_array($_POST);
    $_REQUEST = stripslashes_array($_REQUEST);
}
开发者ID:abcarroll,项目名称:DABL,代码行数:7,代码来源:strip_request_slashes.php


示例2: fetch_data

 function fetch_data()
 {
     global $dbh;
     $this->p_perso = new parametres_perso("empr");
     $this->circ_tpl = array();
     $this->piedpage = "";
     $requete = "select * from serialcirc where id_serialcirc=" . $this->id;
     $resultat = pmb_mysql_query($requete);
     if (pmb_mysql_num_rows($resultat)) {
         $r = pmb_mysql_fetch_object($resultat);
         if ($r->serialcirc_tpl) {
             //On va récupérer le template prédéfini
             if ($r->serialcirc_tpl + 0 > 0) {
                 $query = "select * from serialcirc_tpl where serialcirctpl_id=" . $r->serialcirc_tpl;
                 $res = pmb_mysql_query($query, $dbh);
                 if ($res) {
                     $row = pmb_mysql_fetch_object($res);
                     if ($row->serialcirctpl_tpl) {
                         $this->circ_tpl = stripslashes_array(unserialize($row->serialcirctpl_tpl));
                         $this->piedpage = $row->serialcirctpl_piedpage;
                     }
                 }
             } else {
                 $this->circ_tpl = stripslashes_array(unserialize($r->serialcirc_tpl));
                 $this->piedpage = $r->serialcirc_piedpage;
             }
         }
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:serialcirc_print_fields.class.php


示例3: search_product_by_bn

 /**
  * 获取循单操作
  *
  * @param array $data
  *
  * @return 循单操作
  */
 function search_product_by_bn($data)
 {
     $data = stripslashes_array($data);
     $member = array();
     $result['alert_num'] = $this->system->getConf('system.product.alert.num');
     $products = array();
     $product_list = json_decode($data['bns']);
     $dealer_id = $data['dealer_id'];
     $arr_goods_list = array();
     $obj_member = $this->load_api_instance('verify_member_valid', '2.0');
     $obj_member->verify_member_valid($dealer_id, $member);
     //根据经销商ID验证会员记录有效性
     $obj_payments = $this->load_api_instance('search_payments_by_order', '2.0');
     foreach ($product_list as $bn) {
         //$bn = str_replace('\\','',$bn);
         $status = 'normal';
         if ($product = $this->db->selectrow('select goods_id,product_id,price,store,freez,name,pdt_desc,weight from sdb_products where bn="' . $bn . '"')) {
             if (!isset($arr_goods_list[$product['goods_id']])) {
                 $goods = $this->db->selectrow('select goods_id,cat_id,brand_id,marketable,disabled from sdb_goods where goods_id=' . $product['goods_id']);
                 if ($goods) {
                     $arr_goods_list[] = $goods;
                 }
             } else {
                 $goods = $arr_goods_list[$product['goods_id']];
             }
             if (!$goods || $goods['disabled'] == 'true') {
                 $status = 'deleted';
             }
             if ($goods['marketable'] == 'false') {
                 $status = 'shelves';
             }
             if (is_null($product['store'])) {
                 $product['store'] = $product['store'];
             } else {
                 $product['store'] = $product['store'] - $product['freez'];
             }
             $product['link'] = $this->system->base_url() . "index.php?ctl=product&p[0]=" . $product['goods_id'];
             unset($product['freez']);
         } else {
             $status = 'deleted';
         }
         $product['price'] = $obj_payments->changer($this->get_product_lv_price($member['member_lv_id'], $product['product_id'], $product['price']));
         //获取该会员下的等级价格
         $product['bn'] = $bn;
         $product['status'] = $status;
         $goods = $this->db->selectrow("SELECT thumbnail_pic FROM sdb_goods WHERE goods_id=" . $product['goods_id']);
         $thumbnail_pic = explode("|", $goods['thumbnail_pic']);
         $product['thumbnail_pic'] = empty($goods['thumbnail_pic']) ? "" : (count($thumbnail_pic) == 3 ? $this->system->base_url() . $thumbnail_pic[0] : $thumbnail_pic[0]);
         unset($product['goods_id']);
         unset($product['product_id']);
         $products[] = $product;
     }
     $obj_product_line = $this->load_api_instance('search_product_line', '2.0');
     $obj_product_line->checkDealerPurview($member, $arr_goods_list);
     //检查会员的代销权限
     $result['data_info'] = $products;
     $this->api_response('true', false, $result);
 }
开发者ID:noikiy,项目名称:MyShop,代码行数:65,代码来源:api_b2b_2_0_product.php


示例4: strip_all_slashes

function strip_all_slashes()
{
    if (get_magic_quotes_gpc()) {
        stripslashes_array($_GET, true);
        stripslashes_array($_POST, true);
        stripslashes_array($_COOKIE, true);
        stripslashes_array($_REQUEST, true);
    }
}
开发者ID:brightmore,项目名称:jethro-pmm,代码行数:9,代码来源:general.php


示例5: stripslashes_array

 function stripslashes_array(&$arr)
 {
     foreach ($arr as &$val) {
         if (is_array($val)) {
             $val = stripslashes_array($val);
         } else {
             $val = stripslashes($val);
         }
     }
 }
开发者ID:Cythral,项目名称:futurebb,代码行数:10,代码来源:startup.php


示例6: undoMagic

function undoMagic($data)
{
    if (!get_magic_quotes_gpc()) {
        return $data;
    }
    if (ini_get('magic_quotes_sybase') != 1) {
        return stripslashes_array($data);
    } else {
        return undoSybaseQuotes_array($data);
    }
}
开发者ID:hatone,项目名称:Nucleus-v3.64,代码行数:11,代码来源:vars4.0.6.php


示例7: stripslashes_array

function stripslashes_array($data)
{
    if (is_array($data)) {
        foreach ($data as $key => $value) {
            $data[$key] = stripslashes_array($value);
        }
        return $data;
    } else {
        return stripslashes($data);
    }
}
开发者ID:tomVertuoz,项目名称:framework,代码行数:11,代码来源:DisableMagicQuotes.inc.php


示例8: stripslashes_array

 function stripslashes_array(&$array, $iterations = 0)
 {
     if ($iterations < 3) {
         foreach ($array as $key => $value) {
             if (is_array($value)) {
                 stripslashes_array($array[$key], $iterations + 1);
             } else {
                 $array[$key] = stripslashes($array[$key]);
             }
         }
     }
 }
开发者ID:samratcis,项目名称:atk4,代码行数:12,代码来源:Web.php


示例9: stripslashes_array

function stripslashes_array($array)
{
    $rs = array();
    while (list($key, $val) = @each($array)) {
        if (is_array($val)) {
            $rs[$key] = stripslashes_array($val);
        } else {
            $rs[$key] = stripslashes($val);
        }
    }
    return $rs;
}
开发者ID:horrabin,项目名称:opendb,代码行数:12,代码来源:utils.php


示例10: fetch_data

 function fetch_data()
 {
     $this->p_perso = new parametres_perso("empr");
     $this->circ_tpl = array();
     $requete = "select * from serialcirc where id_serialcirc=" . $this->id;
     $resultat = mysql_query($requete);
     if (mysql_num_rows($resultat)) {
         $r = mysql_fetch_object($resultat);
         if ($r->serialcirc_tpl) {
             $this->circ_tpl = stripslashes_array(unserialize($r->serialcirc_tpl));
         }
     }
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:13,代码来源:serialcirc_print_fields.class.php


示例11: stripslashes_array

function stripslashes_array(&$array)
{
    if (is_array($array)) {
        foreach ($array as $k => $v) {
            $array[$k] = stripslashes_array($v);
        }
    } else {
        if (is_string($array)) {
            $array = stripslashes($array);
        }
    }
    return $array;
}
开发者ID:royalwang,项目名称:youbbs,代码行数:13,代码来源:common.php


示例12: stripslashes_array

function stripslashes_array(&$array)
{
    if (is_array($array)) {
        $keys = array_keys($array);
        foreach ($keys as $key) {
            if (is_array($array[$key])) {
                stripslashes_array($array[$key]);
            } else {
                $array[$key] = stripslashes($array[$key]);
            }
        }
    }
}
开发者ID:kangza,项目名称:hagtag,代码行数:13,代码来源:helper.inc.php


示例13: array_stripslashes

function array_stripslashes(&$array)
{
    if (!is_array($array)) {
        return false;
    }
    while (list($key) = each($array)) {
        if (is_array($array[$key])) {
            stripslashes_array($array[$key]);
        } else {
            $array[$key] = stripslashes($array[$key]);
        }
    }
}
开发者ID:rafasashi,项目名称:PHP_Beautifier,代码行数:13,代码来源:index.php


示例14: stripslashes_array

/**
*	stripslashes 取消转义 数组
*
*	1 参数 输入数组
*
*	返回值 处理后的数组
**/
function stripslashes_array($value)
{
    if (is_array($value)) {
        $value = array_map(__FUNCTION__, $value);
    } elseif (is_object($value)) {
        $vars = get_object_vars($value);
        foreach ($vars as $key => $data) {
            $value->{$key} = stripslashes_array($data);
        }
    } else {
        $value = stripslashes($value);
    }
    return $value;
}
开发者ID:nladuo,项目名称:mycode-backup,代码行数:21,代码来源:function.php


示例15: fetch_data

 function fetch_data()
 {
     global $dbh;
     $this->p_perso = new parametres_perso("empr");
     $this->circ_tpl = array();
     $requete = "select * from serialcirc_tpl where serialcirctpl_id=" . $this->id;
     $resultat = pmb_mysql_query($requete, $dbh);
     if (pmb_mysql_num_rows($resultat)) {
         $r = pmb_mysql_fetch_object($resultat);
         if ($r->serialcirctpl_tpl) {
             $this->circ_tpl = stripslashes_array(unserialize($r->serialcirctpl_tpl));
         }
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:14,代码来源:serialcirc_tpl_print_fields.class.php


示例16: stripslashes_array

function stripslashes_array(&$array)
{
    while (list($key, $var) = each($array)) {
        if ($key != 'argc' && $key != 'argv' && (strtoupper($key) != $key || '' . intval($key) == "{$key}")) {
            if (is_string($var)) {
                $array[$key] = stripslashes($var);
            }
            if (is_array($var)) {
                $array[$key] = stripslashes_array($var);
            }
        }
    }
    return $array;
}
开发者ID:js-wei,项目名称:Wechat,代码行数:14,代码来源:function.php


示例17: stripslashes_array

 function stripslashes_array(&$arr)
 {
     foreach ($arr as $k => &$v) {
         $nk = stripslashes($k);
         if ($nk != $k) {
             $arr[$nk] =& $v;
             unset($arr[$k]);
         }
         if (is_array($v)) {
             stripslashes_array($v);
         } else {
             $arr[$nk] = stripslashes($v);
         }
     }
 }
开发者ID:loonix,项目名称:music-stream-vote,代码行数:15,代码来源:Util.php


示例18: stripslashes_array

/**
* stripslashes_array
* Recursive function to remove slashes from an array or single keyword.
*
* @param array If the parameter is an array it will be called recursively. Will eventually just stripslashes from the keys and values for each element.
*
* @return mixed Returns either an array or string - depending on what was passed in.
*/
function stripslashes_array($array)
{
    if (is_array($array)) {
        $return = array();
        foreach ($array as $key => $value) {
            $key = stripslashes($key);
            if (is_array($value)) {
                $return[$key] = stripslashes_array($value);
                continue;
            }
            $return[$key] = stripslashes($value);
        }
    } else {
        $return = stripslashes($array);
    }
    return $return;
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:25,代码来源:general.php


示例19: params

function params()
{
    $params = array();
    if (!empty($_POST)) {
        if (get_magic_quotes_gpc() == 1) {
            //echo "1";
            $params = array_merge($params, stripslashes_array($_POST));
        } else {
            //echo "2";
            $params = array_merge($params, $_POST);
        }
    }
    if (!empty($_GET)) {
        if (get_magic_quotes_gpc() == 1) {
            $params = array_merge($params, stripslashes_array($_GET));
        } else {
            $params = array_merge($params, $_GET);
        }
    }
    return $params;
}
开发者ID:ajpadilla,项目名称:tienda-virtual,代码行数:21,代码来源:index.php


示例20: stripslashes_array

/**
 * Wrapper around stripslashes to handle arrays, with the advantage that you
 * can select which fields should be handled by htmlentities and with advantage,
 * that you can eliminate all slashes by setting complete=true
 *
 * @param array The subject array
 * @param int See php documentation about this
 * @param string See php documentation about this
 * @param string The fields which should be checked for, separated by spaces
 * @param bool Select true to use stripslashes_complete instead of stripslashes
 * @return array The array with stripslashe'd strings
 * @author Florian Lippert <[email protected]>
 */
function stripslashes_array($subject, $fields = '', $complete = false)
{
    if (is_array($subject)) {
        if (!is_array($fields)) {
            $fields = array_trim(explode(' ', $fields));
        }
        foreach ($subject as $field => $value) {
            if (!is_array($fields) || empty($fields) || is_array($fields) && !empty($fields) && in_array($field, $fields)) {
                /**
                 * Just call ourselve to manage multi-dimensional arrays
                 */
                $subject[$field] = stripslashes_array($subject[$field], $fields, $complete);
            }
        }
    } else {
        if ($complete == true) {
            $subject = stripslashes_complete($subject);
        } else {
            $subject = stripslashes($subject);
        }
    }
    return $subject;
}
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:36,代码来源:function.stripslashes_array.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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