Home  >  Article  >  Backend Development  >  PHP 批量图片缩放预览有关问题

PHP 批量图片缩放预览有关问题

WBOY
WBOYOriginal
2016-06-13 10:17:03677browse

PHP 批量图片缩放预览问题?
1 读取某个文件夹下来的图片。 

2 将图片读到内存中,按一定算法缩放,生成 $image对象。

3 在每张图片旁边,建立表单,填写图片名称,类别等信息,存入数据库。


3 关键是怎么展示到WEB页面上啊? 

//这种方式只能展现一张图片啊, 我要读取N张图片。
header('Content-type: image/jpeg');
imagejpeg($dstimage, null,100);

-------------------------------------------------------
有一种方法是说:  
但是没有写这么弄? action里面header('Content-type: image/jpeg'); imagejpeg($dstimage, null,100); 这样做吗?
--------------------

有没有什么办法呢? 给个文章链接就行了。 图片缩略和文件操作我都写好了。

------解决方案--------------------
有一种方法是说:
就是这样干啊,action=imagepreview中根据filename参数读取指定图片文件
------解决方案--------------------
不存在批量,除非生成物理图片


PHP 批量图片缩放预览有关问题
......
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn