arielcr / image-cache
简单的图像缓存类
dev-master
2013-11-08 22:52 UTC
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-09-24 01:51:16 UTC
README
##介绍 这是一个简单的类,可以将外部图像保存到缓存文件夹中。它还具有按宽度比例调整大小的能力。
##安装
Composer
此类遵循PSR-0规范,可以使用 composer 安装。只需将 arielcr/image-cache 添加到您的 composer.json 文件中。Composer 是 PEAR 的合理替代品。它在管理大型项目中的依赖项方面表现卓越。
{
"require": {
"arielcr/image-cache": "dev-master"
}
}
##用法 用法非常简单。只需调用要缓存的图像 src 上的函数即可。
<img src="<?php echo Image\Cache::get($image_url, $width); ?>" >
缓存图像将位于 /cache/images/ 文件夹中。