PHP Batch generation image thumbnails This batch generated thumbnail code can generate a small map of a specified size Oh, and support file batch upload.
PHP tutorial Batch generate picture thumbnails
This batch generated thumbnail code can generate a small graph of a specified size, and supports batch upload of files.
This tutorial will use PHP files
view.php
config.php
funs.php
index.php
Function:
-----------------------
1. Generate a specified size thumbnail for a picture in a folder
2. List sub-folders, you can specify a folder to create
3. To facilitate different size of the thumbnail generation, the picture is saved to a new directory, and the directory structure is unchanged
Realize:
-----------------------
1. Picture Original folder $image
2. Save in $newimage after processing
Keep directory structure and file name unchanged (easy to call)
3. If the picture already exists in the new folder, skip directly
Operating interface:
-----------------------
1. $image Input Box
2. $newimage input box (if not filled in, just for the current directory of the same size as the thumbnail file name of the directory)
3. Click "Search", List all folders, generate cache, write to file.
4. Generate. Creating subdirectories
*/
?>
index.php Code
Generate thumbnails
!--? php
/* +-------------------------------------------------------------+
* | Copyright (c) 2008 -2009 yese.in All rights reserved.
* +-------------------------------------------------------------+
* | Author:wbsifan
* +-------------------------------------------------------------+
* | filename:index.php v0. 1
* | update:2008-07-01
* | content: Generate thumbnail image
* +------------------------------------------------ -------------+
*/1 2 3 4 5
http://www.bkjia.com/PHPjc/444889.html www.bkjia.com true http://www.bkjia.com/PHPjc/444889.html techarticle php Batch generation image thumbnails This batch generated thumbnail code can generate a small map of a specified size Oh, and support file batch upload. PHP tutorial Batch generation picture thumbnail this batch ...