随笔分类 - 微擎
摘要:pdo_fetchcolumn() - 根据SQL语句,查询第一条记录的第N列的值,此语句与 pdo_fetch 使用相同,只是此函数返回的不是一个数组而是一个字符串 // 获取用户的总数,返回的值是一个数字 $user_total = pdo_fetchcolumn("SELECT COUNT(*
阅读全文
摘要:global $_W; if( empty($_W['openid']) ){ $_W['openid'] = m('account')->checkLogin(); }
阅读全文
摘要:$tcate = $_GPC['cate']; $page = ((!(empty($_GPC['page'])) ? intval($_GPC['page']) : 1)); $pagesize = ((!(empty($_GPC['pagesize'])) ? intval($_GPC['pag
阅读全文
摘要:$mid = m('member')->getMid(); public function getMid() { global $_W; $openid = $_W['openid']; $member = $this->getMember($openid); return $member['id'
阅读全文
摘要:$this->message("该活动已失效,请浏览其他商品或联系商家!", mobileUrl("groups/index"), "error");
阅读全文
摘要:global $_W;load()->model('mc');$uid = mc_openid2uid($openid);
阅读全文
摘要:if(empty($_W['openid'])||$_W['fans']['follow']!=1){ message( '请先关注公众号!', '', 'error' );} 当$_W['openid']为空时, $_W['fans']['follow'] 等于0是没有关注 等于1是已经关注 fo
阅读全文
摘要://查询一条数据 $info pdo_fetch('select * from '.tablename('ewei_shop_member').'where openid=:openid and uniacid=:uniacid limit 1',array(':uniacid'=>$_W['uni
阅读全文
摘要:$member = m("member")->getMember($openid, true);getMember()这个函数是在 addons/core/model/member.php中 load()->model('mc'); //load()->model() 加载系统model函数 //
阅读全文
摘要:转载 https://www.90shengjie.cn/1020.html
阅读全文
摘要:pdo_get 根据条件(AND连接)到指定的表中获取一条记录 $tablename 参数指定要查询的数据表名,此处传入的表名不要使用tablename()函数 $condition 参数指定查询的条件,以是 AND 连接,支持大于,小于等范围查询 $fields 参数指定查询返回的字段列表 //根
阅读全文
摘要:https://xxx.com/web/index.php?c=site&a=entry&m=ewei_shopv2&do=web&r=creditshop.log.order 页面目录在plugin/creditshop/core/web/log.php 是log.php中的order()函数
阅读全文
摘要://html代码 <div class="fui-uploader fui-uploader-sm" data-max="5" data-count="0"> <input type="file" name='imgFile0[]' id='imgFile0' multiple="" accept=
阅读全文
摘要:$arr = array('url'=>'www.phpos.net','function','num'=>99,'question'=>'您喜欢哪个网站?','answer'=>array('微信网','腾讯网','百度网')); var_dump(iserializer($arr)); 结果:
阅读全文
摘要:1、前端爱心时间中的任务中心 https://xxx.com/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=commission.tasks 文件所在位置 plugin/commission/core/mobile/index.php中的ta
阅读全文
摘要:$condition = ' and uniacid = :uniacid and deleted=0';$params = array(':uniacid' => $_W['uniacid']);$pindex = max(1, intval($_GPC['page'])); $psize = 2
阅读全文
摘要:微擎sql语句 1、pdo_update 更新指定的数据表记录 array | boolean pdo_update($tablename,$data = array(),$condition, $glue = 'AND'); //更新uid=2用户的用户名 $user_data = array(
阅读全文
摘要:入口脚本程序获取到到URL中相关的GET参数,解析后进行权限判断,然后调用相应的控制器处理这个请求。该过程就被称为URL路由(routing)。 约定及使用GET 参数中的 c、a、do为微擎系统的路由参数,应当避免与系统参数冲突,在程序中可以使用 $controller、$action、$do来获
阅读全文