thinkphp中图片处置

WBOY
Release: 2016-06-13 12:14:48
Original
1047 people have browsed it

thinkphp中图片处理
 foreach($info as $file){      
$cc=$data['img'] = $file['savename'];
echo basename('./Uploads/42.jpg','.jpg');

$image->open('./Uploads/图片名称.jpg');
$image->thumb(150, 150)->save('./Uploads/图片名称.jpg');
$User = M("User");  
$User->where("id='{$aa}'")->save($data);
$this->success('上传成功', 'cc');

我想要把上传的图片进行修改,不知道在图片名称位置处写什么
------解决思路----------------------
open打开原图,$file['savename']
至于缩略图命名,简单的在后面加个单词,或是写个通用函数,根据原图文件名去生成也行

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!