0
点赞
收藏
分享

微信扫一扫

微擎多图片上传

骑在牛背上看书 2022-08-29 阅读 178

//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') . "\r\n" . ' 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));
}
}

 

世界上最美的风景,是自己努力的模样



举报

相关推荐

0 条评论