欢迎来到天天文库
浏览记录
ID:30505107
大小:15.87 KB
页数:4页
时间:2018-12-30
《php基于codeigniter实现图片上传、剪切功能》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、我真正系统地接触和学习党的基本知识是在这次中级党校的培训班上。通过学习,了解了党的发展历程,对党的性质、宗旨、任务等基本知识有了进一步的了解php基于CodeIgniter实现图片上传、剪切功能 本文实例为大家分享了codeigniter图片上传、剪切,控制器类,供大家参考,具体内容如下 defined('BASEPATH')ORexit('Nodirectscriptaccessallowed'); classIndexextendsMY_Controller{ function__construct(){
2、 parent::__construct(); $this->load->helper(array('form','url')); } /** *首页 */ publicfunctionindex(){ $this->load->view('upload_form',array('error'=>'')); } publicfunctiondo_upload() { $config['upload_path'] ='./data/uploads/';对党的认识也有了进一步的提
3、高。才真正体会到了中国共产党的伟大、光荣和正确,更感到只有中国共产党是全中国最广大人民利益的忠实代表我真正系统地接触和学习党的基本知识是在这次中级党校的培训班上。通过学习,了解了党的发展历程,对党的性质、宗旨、任务等基本知识有了进一步的了解 $config['allowed_types'] ='gif
4、jpg
5、png'; $config['max_size'] =100; $config['max_width'] =1024; $config['max_height'] =768; $this-
6、>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()); $
7、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'];对党的认识也有了进一步的提高。才真正体会到了中国共产党的伟大、光荣和正确,更感到只有中国共产党是全中国最广大人民利益的忠实
8、代表我真正系统地接触和学习党的基本知识是在这次中级党校的培训班上。通过学习,了解了党的发展历程,对党的性质、宗旨、任务等基本知识有了进一步的了解 $config['maintain_ratio']=TRUE; if($width>=$height) { $config['master_dim']='height'; }else{ $config['master_dim']='width'; } $config['width']=180; $config['height']
9、=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);
10、 } $this->image_lib->initialize($config); $this->image_lib->crop();对党的认识也有了进一步的提高。才真正体会到了中国共产党的伟大、光荣和正确,更感到只有中国共产党是全中国最广大人民
此文档下载收益归作者所有