Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,198,777 members, 7,969,291 topics. Date: Tuesday, 08 October 2024 at 02:19 AM |
Nairaland Forum / Science/Technology / Programming / Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video (1826 Views)
Learn Codeigniter Step By Step From Me - Affordable / Data Science Tutorial For Beginners With Python Programming Language / Testing My Codeigniter Skill (2) (3) (4)
Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 9:48pm On Aug 23, 2016 |
Seeing that some people come here on nairaland to ask or compare php to other programming languages or find it difficult in coding with php. I have decided to put up a tutorial to show you an easier way of coding in php. You don't have to spend hours coding. CI can help reduce the workload. Note:this is my first time doing this kind of stuff. Make una help me with una comments and constructive criticism. Oya, lets go! 1 Like 2 Shares |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 10:42pm On Aug 23, 2016 |
Introduction What is codeIgniter? CodeIgniter(ci) is a php framework. A framework simply means an assemblage of functions. To cut the long story short, a framework will help you code faster, cleaner and reusable code. For example, imagine that you want to create a form validation process. You will have to go through the tedious process of creating the form. Then probably creating another file to handle the validation. For those knowledgeable in oop style. You will then create a class and object for it. Imagine all this long journey for simple validation. You just set the form like this. php echo validation_errors(); ?> <?php echo form_open('welcome/mail') ?> Name: <?php echo form_input('name', set_value('name')); ?> <br/> Phone: <?php echo form_input('phone', set_value('phone')); ?> <br/> Message: <?php echo form_textarea('message', set_value('message') And touch 1 or 2 in the controller and you are all set. CI already has what it calls "helpers and libraries" to help you out. All you have to do is call the function you want to use. Don't worry if do not understand all i am saying now, it all become clearer as the tutorial progresses. CodeIgniter follows the MVC pattern(will explain this later) of development. It is also object oriented. What you need for this tutorial. 1.you must have basic knowledge of php and mysql 2.html 3.get a server. Preferably xampp for windows users 4.download codeigniter. Its lightweight, so you cry about mb. Its just about 2mb or so. Will teach how to install and configure later. Note: they are other php frameworks out there. Like cakePhp, laravel, zend framework etc. They all have their pro and cons. So just google them to get more info. |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 10:50pm On Aug 23, 2016 |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 11:18pm On Aug 23, 2016 |
Installation First you need to have a hosted server(e.g xampp). After you have hosted your server go to the codeIgniter website at [url]http://codeigniter.com [/url]. Click on the download button on the homepage to download it.
|
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 12:07am On Aug 24, 2016 |
after you have downloaded CodeIgniter, Unzip the folder, and install the CodeIgniter files in your website's or server root folder. If you are using XAMPP, this is usually the HT docs folder within the Xampp folder. For WAMP it is WWW inside the Wamp folder.
|
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 12:14am On Aug 24, 2016 |
Once you have moved the CI files, have a look at the new directories that have been created. Understanding what different type of files and folders do is critical. The initial files and folders we can see are: • system folder • Application folder • user_guide folder • index.php file Composer.php • license.txt We are only going to focus on the system and application folder and index.php file in this tutorial
|
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 12:16am On Aug 24, 2016 |
move the application folder into the system folder.
|
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 12:25am On Aug 24, 2016 |
These are our main site's files and folders, the index.php file being the most important one, it will act as the main controller and will route application requests to the required controllers. Without this file, CodeIgniter can't work. Next in importance is the system folder. The framework's base files and libraries are present in this folder. We, as programmers, won't need to modify those files for our normal usage. However, it's important to know what those files are and what they do. The most important folder, the one that deserves most of your attention, is the system/application folder and all of its sub folders. Ninety - nine percent of your work will be done right in this folder, so it deserves a bit of attention at this point. Learning "what goes where" now, will reduce confusion later |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 12:28am On Aug 24, 2016 |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by lmoshood: 1:41am On Aug 24, 2016 |
Please continue you're doing great job |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by chukwuebuka077: 2:30am On Aug 24, 2016 |
Ride on bro.I am enjoying It |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 1:48am On Aug 25, 2016 |
configurations I want you to first rename the CodeIgniter folder. To CI or any other name of your choice. Now that we have renamed our codeIgniter base file and taken a look at our CI files and structure, we are going to check if it's working. An easy way to see if your site is working is to navigate to it using your browser. Http://Localhost/ci It will bring out the welcome page. Then you will know its working. Next will be the configurations proper
|
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by chukwuebuka077: 7:12am On Aug 25, 2016 |
I am with you brother ride on |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 4:10pm On Aug 25, 2016 |
the first file we are going to look at is the Config.ph file. Locate it at the system/application/config.php The config.php file contains a series of configuration options that CodeIgniter uses to keep track of your application's information and settings. The first configuration option you need to set inside config.php is the base URL of your application. You do that by setting the absolute URL for $config['base_url'] , like so: $config['base_url'] = “http://localhost/ci/”; Once you've set this configuration option, you can recall it whenever you want using the CodeIgniter base_url() function, which can be a very handy thing to know. This one feature keeps you from having to rewrite hard coded URLs in your application, when you migrate from development to test or from test to production. The second thing you need to do is set a value for your home page by editing the $config['index_page'] configuration option. CodeIgniter ships with a value of "index.php" for this option, which means that index.php will appear in all of your URLs. Many CodeIgniter developers prefer to keep this value blank, like so: $config['index_page'] = ''; |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 4:16pm On Aug 25, 2016 |
Change $config['url_protocol']; to AUTO
|
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 4:23pm On Aug 25, 2016 |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by JASKID: 6:21am On Sep 13, 2016 |
How do i contact you? |
Re: Codeigniter Tutorial For Beginners- Explanation With Text,pics And Video by louie3(m): 9:44am On Sep 13, 2016 |
JASKID:You can message me through my email. Obilouis@gmail.com |
(1) (Reply)
I Want A Nigerian Verified Non Hosted Adsense To Buy / Sleeping Computer In Java / Advice Needed ASAP!!!
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 22 |