zoukankan      html  css  js  c++  java
  • 微擎多图片上传

    //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));
                }
            }
    世界上最美的风景,是自己努力的模样
  • 相关阅读:
    228. Summary Ranges
    227. Basic Calculator II
    224. Basic Calculator
    222. Count Complete Tree Nodes
    223. Rectangle Area
    221. Maximal Square
    220. Contains Duplicate III
    219. Contains Duplicate II
    217. Contains Duplicate
    Java编程思想 4th 第4章 控制执行流程
  • 原文地址:https://www.cnblogs.com/xiong-hua/p/11818897.html
Copyright © 2011-2022 走看看