tp结合uploadifly 图片上传 预览 删除
功能比较简单,市面上都有很多示例。今天做了一个,符合自己需求的。
图例就一张:
先说下原理:
通过uploadifly 上传控件 与PHP端进行处理。
上传过去的数据 以数组形式保存在 session。然后再遍历出来。
删除就是反过来,提交删除的图片。搜索session里面存在的对应的图片,进行删除(我没写文件删除的功能,大家自己写吧)。
代码在右上角。。已上传了。
另外,具体的配置,可以找下uploadifly的手册说明。
补充一点:刚刚发现我这个例子的代码对于路径处理比较粗糙。大家使用时记得修改前端和后端的路径。以免出错。
uploadifly.rar
( 807.77 KB 下载:651 次 )
AD:真正免费,域名+虚机+企业邮箱=0元

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Chinese version
Chinese version, very easy to use

WebStorm Mac version
Useful JavaScript development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver Mac version
Visual web development tools
