处理缩略图的PHP库
/**
* PhpThumb Library Example File
* This file contains example usage for the PHP Thumb Library
* PHP Version 5 with GD 2.0+
* PhpThumb : PHP Thumb Library
* Copyright (c) 2009, Ian Selby/Gen X Design
*
* Author(s): Ian Selby
*
* Licensed under the MIT License
* Redistributions of files must retain the above copyright notice.
*
* @author Ian Selby
* @copyright Copyright (c) 2009 Gen X Design
* @link http://phpthumb.gxdlabs.com
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @version 3.0
* @package PhpThumb
* @subpackage Examples
* @filesource
*/
require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->adaptiveResize(175, 175);
$thumb->show();
在用php开发网站的时候,使用面向对象的方法确实可以提高代码复用率,减少代码冗余。而对初学者更友好的是,PHP开发网站所需要的大部分类库,网上都有十分优秀的类库存在了。这次给大家带来的就是处理缩略图的PHP类库,需要的朋友可以直接拿去使用。
申明:php中文网下载站匠心打造专业的IT资源下载站!一切资源免费,来源网络收集,请自行检测软件的完整性。交流QQ群:916808767