美文网首页
调用公共方法

调用公共方法

作者: 小进我是爸爸 | 来源:发表于2020-04-25 16:23 被阅读0次

E:\www\demo1\app\common\common.func.php
 function ddd($a){
     echo "<pre>" , var_dump($a) ,"</pre>";
}
 load()->app('common');
 ddd($us);
-------------
查询
 $sql = "SELECT id,agentid FROM ".tablename('ewei_shop_member').' WHERE id = :orderid ';
 $us=pdo_fetchall($sql);
-----更新
pdo_update('ewei_shop_member', $data,array('uid' => 2));
--增加--
$res = pdo_insert('ewei_shop_order_peerpay', $data,array('uid' => 2));

----
递归算法 返回一维数组
function arrays_convert_one($data,$x) {
    $result = array();
    foreach ($data as $key => $val) {
        if($val['id']==$x ) {
            $result[]=$val['id'];
            $result= array_merge($result, arrays_convert_one($data,$val['agentid']));
        }
    }
    return $result;
}

注册 上级
E:\www\demo1\addons\ewei_shopv2\plugin\commission\core\mobile\register.php
E:\www\demo1\addons\ewei_shopv2\core\mobile\account\index.php
会员中心
E:\www\demo1\addons\ewei_shopv2\core\mobile\member\index.php
付款 分销
E:\www\demo1\addons\ewei_shopv2\core\mobile\order\pay.php
公共方法
E:\www\demo1\app\common\common.func.php
 load()->app('common');
基本设置
E:\www\demo1\addons\ewei_shopv2\plugin\commission\core\web\index.php
全局变量
E:\www\demo1\data\config.php
 global $_W;
$dqf=$_W['config']['zu']['dqfenhong1'];

相关文章

网友评论

      本文标题:调用公共方法

      本文链接:https://www.haomeiwen.com/subject/dvtkwhtx.html