如何以PHP格式预览上传的图像 [英] how to preview uploaded image in php form

查看:98
本文介绍了如何以PHP格式预览上传的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的网站创建了PHP表单,上面有图片上传选项。
,但它只显示图像提交之前的图像名称,但我想在提交之前查看/预览图像/文件,所以这可能是怎么回事?

i created PHP form for my site, with image upload option on it. but it only show the image name before image submitted, but i want to view/preview the image/file before submit so how this possible in this?

 "file36":{"label":"Select/Upload a Student's Photo","accept":"jpg|jpeg|png|gif|bmt","files":true,"attach":true,"database":true,"maxbytes":204800,"fieldtype":"fileupload","required":true,}},


推荐答案

据我所知,在您上传图片之前,这是不可能的。
但是,您可以使用jquery执行此操作。
查看 http://blueimp.github.io/jQuery-File-Upload/

As far as I know this is not possible with php until you upload the image. However, you are able to do so with jquery. Check out http://blueimp.github.io/jQuery-File-Upload/

这篇关于如何以PHP格式预览上传的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆