调用公共方法

2020-04-25  本文已影响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'];

上一篇 下一篇

猜你喜欢

热点阅读