Generate image thumbnails in batches with PHP (1/5)_PHP tutorial

WBOY
Release: 2016-07-20 11:08:15
Original
860 people have browsed it

PHP Batch Generate Image Thumbnails This batch generation thumbnail code can generate small images of a specified size, and supports batch uploading of files.

PHP tutorial to batch generate image thumbnails
This batch generation thumbnail code can generate small images of a specified size, and supports batch uploading of files.

This tutorial will use the php file
view.php
config.php
funs.php
index.php


Function:
-----------------------
1. Generate thumbnails of specified size for the pictures in the folder
2. List sub-files folder, you can specify a folder to generate
3. To facilitate the generation of thumbnails of different sizes, the images are saved to a new directory, while the directory structure remains unchanged

Implementation:
---- ------------------
1. Original image folder $image
2. Save it in $newimage
after processing to keep the directory structure and file name Unchanged (easy to call)
3. If the image already exists in the new folder, skip directly

operation interface:
------------- ----------
1.$image input box
2.$newimage input box (if not filled in, it will be the directory with the thumbnail size as the file name that is equal to the current directory)
3. Press "Search" to list all folders, generate cache, and write to files.
4. Generate. Generate subdirectories

*/
?>
//index.php code





Generate thumbnail

/* +----------------------------- --------------------------------+
* | copyright (c) 2008-2009 yese.in all rights reserved. 
* +------------------------------------------------- ------------------+
* | author: wbsifan -------------------------------------------------- -------+
* | filename : index.php v0.1
* | update : 2008-07-01
* | content : Generate thumbnail
* +-- -------------------------------------------------- ---------+
*/1 2 3 4 5

http://www.bkjia.com/PHPjc/444889.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444889.htmlTechArticlePHP Batch Generate Image Thumbnails This batch generation thumbnail code can generate small images of a specified size, and supports File batch upload. PHP tutorial batch generation of image thumbnails This batch...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template