# douphp多图组件 **Repository Path**: cuihaifeng123456/douphp_multi_graph_component ## Basic Information - **Project Name**: douphp多图组件 - **Description**: douphp多图组件,支持拖拽排序以及删除 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2018-06-15 - **Last Updated**: 2021-04-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # douphp多图组件 #### 项目介绍 douphp多图组件,支持拖拽排序以及删除 ### 使用方法,以产品多图为例 在需要多图的模板中 {include file="templates/gallery_widget.htm"} ``` 图集上传 ``` 后端PHP逻辑: ``` //ajax上传处理逻辑,上传产品为例 if ($rec == 'upload_gallery'){ if ($_FILES['img_url']) { $image_name = $img->upload_image('img_url'); $file_name = $images_dir . $image_name; echo $file_name; } else { echo ''; } } ``` 前台调用 ``` $product['gallery'] = $product['gallery']?explode(',',$product['gallery']):false; //smarty调用代码 //{foreach from=$product.gallery item=gallery} //
  • // //
  • // {/foreach} ```