![]() We define here method for performing upload and crop operations. The below controller class handles request and response for clients. $autoload = array('html', 'url', 'file') Creating Controller ClassĬreate a controller file ImageCrop.php under application/controllers with the following source code. We need some configurations, such as, auto-loading for helpers to avoid loading every time we need to use. We may not mention the project root directory in subsequent sections and we will assume that we are talking with respect to the project root directory. Now move all the directories and files from Codeigniter 3.1.10 framework into codeIgniter-3.1.10-crop-image directory. Next we will create a project root directory called codeIgniter-3.1.10-crop-image under the Apache server’s htdocs folder. It’s assumed that you have setup Apache 2.4, PHP 7.3.5 and Codeigniter 3.1.10 in Windows system. We need to first create our root project directory in order to implement the Codeigniter multi-language website. Recommended Reading: Upload and Resize Image using Codeigniter and Upload and Rotate Image using Codeigniter Example Implementation Creating Project Directory PrerequisitesĪpache 2.4, PHP 7.3.5, Codeigniter 3.1.10 So here we will upload the image first and then crop the image. You can set various preferences, restricting the type and size of the files. Codeigniter’s Image Library class allows us to process images, such as, crop, resize, rotate, watermark etc. CodeIgniter’s File Uploading Class permits files to be uploaded. This tutorial will show you how to upload and crop image using Codeigniter.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |