• 微擎多图片上传


    //html代码
                        <div class="fui-uploader fui-uploader-sm" data-max="5" data-count="0">
                            <input type="file" name='imgFile0[]' id='imgFile0' multiple="" accept="image/*" >
                        </div>
    //php代码
    $comments = $_GPC['comments'];
    
            foreach ($comments as $c ) 
            {
    
                var_dump($c);
                $old_c = pdo_fetchcolumn('select count(*) from ' . tablename('ewei_shop_creditshop_comment') . "
    " . '            where uniacid=:uniacid and logid=:logid and goodsid=:goodsid limit 1', array(':uniacid' => $_W['uniacid'], ':goodsid' => $c['goodsid'], ':logid' => $logid));
                if (empty($old_c)) 
                {
                    $comment = array('uniacid' => $uniacid, 'logid' => $logid, 'logno' => $log['logno'], 'goodsid' => $c['goodsid'], 'level' => $c['level'], 'content' => trim($c['content']), 'images' => (is_array($c['images']) ? iserializer($c['images']) : iserializer(array())), 'openid' => $openid, 'nickname' => $member['nickname'], 'headimg' => $member['avatar'], 'time' => time(), 'checked' => $checked);
                    pdo_insert('ewei_shop_creditshop_comment', $comment);
                }
                else 
                {
                    $comment = array('append_content' => trim($c['content']), 'append_images' => (is_array($c['images']) ? iserializer($c['images']) : iserializer(array())), 'append_checked' => $checked, 'append_time' => time());
                    pdo_update('ewei_shop_creditshop_comment', $comment, array('uniacid' => $_W['uniacid'], 'goodsid' => $c['goodsid'], 'logid' => $logid));
                }
            }
    世界上最美的风景,是自己努力的模样
  • 相关阅读:
    subtext 安装PythonIDE -Anaconda
    Python--DBUtil
    python操作oracle数据库-查询
    Python 离线工作环境搭建
    Scrapy-下载中间件
    centos安装 Anaconda3及使用
    Scrapy爬取人人网
    海明距离
    中心极限定理
    最大似然估计 (MLE)与 最大后验概率(MAP)在机器学习中的应用
  • 原文地址:https://www.cnblogs.com/xiong-hua/p/11818897.html
Copyright © 2020-2023  润新知