php图片上传,php图片剪切
后端开发-php教程
本文实例为大家详细介绍了php实现图片上传、剪切功能的具体代码,供大家参考,具体内容如下视频课程网站源码,vscode编写asp,ubuntu怎样安装腾讯视频,查看tomcat指令,sqlite时间运算,网站 播放器插件,有没有前端ui框架,asp.net爬虫,php变量传值,夏津seo,评书网站程序源码,网页下象棋,帝国响应式网站模板,404 页面 源码,网址管理系统源码,视频网站程序下载lzw
load->helper(array('form', 'url')); } /** * 首页 */ public function index() { $this->load->view('upload_form', array('error' => ' ' )); } public function do_upload() { $config['upload_path'] = './data/uploads/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = 100; $config['max_width'] = 1024; $config['max_height'] = 768; $this->load->library('upload', $config); if ( ! $this->upload->do_upload('userfile')) { $error = array('error' => $this->upload->display_errors()); $this->load->view('upload_form', $error); } else { $data = array('upload_data' => $this->upload->data()); $this->load->library('image_lib'); list($width, $height) = getimagesize($data['upload_data']['full_path']); $config['image_library'] = 'gd2'; $config['source_image'] = $data['upload_data']['full_path']; $config['maintain_ratio'] = TRUE; if($width >= $height) { $config['master_dim'] = 'height'; }else{ $config['master_dim'] = 'width'; } $config['width'] = 180; $config['height'] = 180; $this->image_lib->initialize($config); $this->image_lib->resize(); $config['maintain_ratio'] = FALSE; if($width >= $height) { $config['x_axis'] = floor(($width * 180 / $height - 180)/2); }else{ $config['y_axis'] = floor(($height * 180 / $width - 180)/2); } $this->image_lib->initialize($config); $this->image_lib->crop(); $this->load->view('upload_success', $data); } }}
asp.net购物车源码,vscode怎么自动换行快捷键,ubuntu桌面版安装,tomcat工作原理及部署,sqlite 上传blob,网页设计中遇到的困难,邮箱如何开通imap服务器,gbk插件转码工具,拿铁前端框架,黑爬虫官网,php游标,企业seo外包服务,网站子页面模板,经典网页样式,shopnum1 模板,html 优惠券页面,java的权限管理系统源码,asp程序代码lzw