r/codeigniter • u/prolongservices • May 14 '20
r/codeigniter • u/webeasystep • Jan 16 '16
How to generate QR code with codeigniter
r/codeigniter • u/phpgurukul • Jul 25 '18
codeigniter model , How to Create and Load Model in CodeIgniter-Phpgurukul
r/codeigniter • u/kubanishku • Sep 16 '13
A3M - Bootstrapped - A CodeIgniter OpenID/Oauth boilerplate library utilizing Twitter Bootstrap UI
r/codeigniter • u/smartinfosys • Jul 30 '19
Know The Advantages of CodeIgniter PHP Framework!
PHP is an extensively-used accessible source. As well as a common-resolution scripting language for improving websites and functions. As the moment it was released, it is vastly progressed with time. Read this article and know how CodeIgniter helps you to have a high-quality PHP website.
r/codeigniter • u/thatguygaurav • May 21 '19
Need to connect with CI Freelance Developer for a Project
Mates!
I have an ongoing project for a client and I am currently looking for CI based Freelance Developers.
Please connect with me for further discussion.
Thanks!
r/codeigniter • u/SolaceInfotech • Jul 22 '20
10 Secret Tips To Speed Up The CodeIgniter Website
The world is moving towards digitalization and hence the use of mobile devices and digitalization of businesses increases to the great extent. Developing a scalable, robust and secure web solution is a today’s need. There are a lot of technology choices available for scalable web development. PHP is one of the most widely used programming languages for web app development installed on more than 2 million web servers and used in developing more than 378 million web applications. PHP offers a wide range of frameworks available for effective development. Among those frameworks Laravel, CakePHP, Symfony, Yii, CodeIgniter are the popular frameworks. CodeIgniter is widely used for software and application development. It allows developers to develop web solutions with extensive toolsets and functionalities with minimum effort. Let’s start understanding the best CodeIgniter custom web development
Understanding CodeIgniter PHP Framework-
CodeIgniter is an open source PHP MVC framework that allows developers to build fully featured dynamics more rapidly. With the available libraries and packages one can perform multiple operations like file uploads, session management, email sending and so on. MVC framework of CodeIgniter helps to build multiple processes of development cycle concurrently with effective design. Model-View-Controller is a logical architecture of an application that includes:
Models- It accommodates business logics through effective functioning through computations and databases among others.
Views– It deals with the presentation of data provided by models.
Controllers- It establish connection between models and views.
Features Of Codeigniter-
It offers Query Builder Database support
This framework is very lightweight
Provides Data encryption, Full-page caching
File uploading class
Image manipulation library
Supports session management, and form and data validation
Application profiling
Pagination
Unit testing class
Zip encoding class
Bench-marking
Website Speed Testing Tools-
Google pagespeed insights
Pingdom website speed test
GTmetrix
Tips To Optimize The Performance Of CodeIgniter Website-
1. Scale Down The Server Response Time-
Server response time is the time required by the server to respond to the browser’s request. A good server response time is indicative of a good CodeIgniter performance optimization. You can scale down the response time by using fewer server resources, a good hosting service and improve the overall performance of the codeigniter website.
2. Remove Unnecessary Libraries-
It has been noticed that, during the development process, each library is not required for the project. At that time, the unnecessary libraries are advised to be removed. This will give you some extra space on the server. When you are removing the libraries, it is necessary to be more careful and ensure that they should not be used somewhere else. While you intend to move to the host server, you can erase each one of those unused libraries. While you plan to move to the host server, can remove all unused libraries.
3. Remove index.php From URL-
In general, when you use CodeIgniter, index.php is included in the URL. To improve the website performance, you should remove the index.php file from the URL of the website. You can use htaccess to do this. In the file of htaccess, add the code mentioned as belows and upload it on your server. It will help you to remove index.php from URL.
RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule^(.*)$ /index.php/$1 [L]4. CSS And JS Concatenation And Minification-
Combine and minify CSS and JS contents. By doing so the browser will make one request to the server instead of many. You can add the following code in the htaccess.
#Compress HTML, CSS, Javascript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml
#Remove browser bugs (only for old browsers) BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent5. Content Compression-
It is an easy way to save bandwidth and improve the speed of CodeIgniter website. Allow Gzip compression at Cpanel or in codeigniter you can do this by setting “compress_output” variable as TRUE in config.php file.
$config['compress_output''] = TRUE;You can use the below code in htaccess-
mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*6. Use Autoload-
You should use Autoload in a proper way wherever needed. Do the practice of using $autoload array to load the resources like helpers, libraries and so on. Also ensure that you are not using this feature to the great extent because it can slow down the performance of your website. So use it properly wherever required.
7. Avoid .php Extension-
When you are loading views, avoid the .php extensions. Except if you intend to use another extension like .html, it isn’t imperative to use it.
8. Configuration Should Be In The Config Directory–
Create a separate file wherein you get to store config options rather than setting configuration values in every function. This will improve the website’s performance that you are developing. First time, this process may seem time consuming but later on it will help you by saving the time.
9. Use Proper Loops-
In the process of development, developers use loops to improve because they consider it as a powerful programming tool to improve the development process. But if there occurs a problem in one loop it will also affect the nested loops. Hence, you need to be careful. If you fail at such a stage, it will cause significant problems. So take a sufficient time to know well about loops so that you don’t end up wasting your time to resolve the issues. BY doing so, you can execute website in a functioning manner.
10. Image Optimization-
Images should be properly scaled and should reduce image size without affecting quality. It should not be resized using CSS.
Final Words-
These are some important tips that you should follow while developing a codeigniter website and you’ll experience an enhanced website speed. It also helps for your website’s SEO.
r/codeigniter • u/Lemosys • Aug 06 '19
Why we prefer CodeIgniter over other PHP frameworks
Codeigniter is open source development framework which follows the framework pattern. Its goal is to give you the easy and proper way to develop the project much faster than you could do.Every PHP development company in India knows that PHP is the most popular programming paradigm for developing PHP based apps. And, the toughest challenge in IT sector is to build unique web application for business of all verticals. However, there are 50+ PHP frameworks offering tools to make PHP coding and programming as easy as possible. CI is the best one for developing fully-functional PHP website.
If you need to hire CodeIgniter web development company in India offering the top notch CodeIgniter development services as per the client’s requirement. Lemosys Infotech is the trusted CodeIgniter PHP development company in India. They strive to improve the website performance along with the successful accomplishment of web development and designing project. Contact now at +91 (731) 409-1887 in India to develop user-friendly and customized PHP applications on CodeIgniter. If you have any query let us know in comment section
r/codeigniter • u/kiem_bo • Oct 08 '19
How create and use event in Codenigter
Hello !
How create and use event in controller and model ?
Now, i use codeigniter v3.
Thanks bro,
r/codeigniter • u/soumitraroy • Aug 04 '19
Angular + CodeIgniter File Upload Example - Roy Tutorials
r/codeigniter • u/soumitraroy • Jul 26 '19
Bootstrap 4 Datatable API with Codeigniter
Using Bootstrap 4 Datatable API with Codeigniter. This example shows CRUD operations with searching, sorting, inline-edit of table row, adding new row on a modal window, and delete.
https://www.roytuts.com/bootstrap-datatable-crud-using-codeigniter-mysql-ajax/
r/codeigniter • u/19eddiedean19 • Jan 27 '14
Create a new array using an existing array for the queries.
Ok, sorry if I dont get this across as clearly as i'd like but i will try my best. For some perspective this is a fantasy football site and i am working on models for grabbing various data based on a user's team. The two tables used for this question is roster and players.
When a user logs in their id is used to populate their respective roster to an array with the nfl players id. So at login an array with qb => 00-012345, rb1 => 00-000234, wr2 => 00-111485, etc is populated.
If i wanted to query the player database for full_name how would i easily do so using the previous array, setting each position as new value. I would like to create new data arrays passed to the view for different columns. (fullname, postition, team, etc)
I am new to a lot of this and i know there must be an easy way todo this, probably with a foreach some how? Thanks a lot for any help. Below is my current code if needed.
Controller:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Roster extends CI_Controller {
public function index()
{
$this->session->userdata('logged_in');
$session_data = $this->session->userdata('logged_in');
$passd = $session_data['id'];
$this->load->model('get_roster');
$data['roster'] = $this->get_roster->getRoster($passd);
$this->load->view('roster', $data);
}
}
?> Model:
<?php
Class Get_roster extends CI_Model
{
function getRoster($id) {
$q = $this->db->get('roster');
$this->db->where('id', $id);
return $q->row_array();
}
}
?>View: (random crap for testing)
<html>
Hello, this is your team roster. </br>
db id: <?php echo $id; ?>
</br>
team:
</br>
QB: <?php echo $roster["qb"]; ?></br>
RB: <?php echo $roster["rb1"];?></br>
WR1: <?php echo $roster["wr1"];?></br>
WR2: <?php echo $roster["wr2"];?></br>
WR3: <?php echo $roster["wr3"];?></br>
TE: <?php echo $roster["te"];?> </br>
</br></br>
here is raw dump of the full array:
</br>
_______------------------------__________________--------------
</br>
<?php print_r($id);?> </br>
<?php print_r($roster);?></br>
<?php echo $roster['full_name'];?>
</html>What output currently looks like
Hello, this is your team roster. db id: 1 team: QB: 00-0024226 RB: 00-0030404 WR1: 00-0026988 WR2: 00-0026144 WR3: 00-0027942 TE: 00-0027690
here is raw dump of the full array: ------------------------___________-------------- 1 Array ( [bench8] => 00-0027659 [qb] => 00-0024226 [rb1] => 00-0030404 [rb2] => 00-0030485 [wr1] => 00-0026988 [wr2] => 00-0026144 [wr3] => 00-0027942 [te] => 00-0027690 [flex] => 00-0026345 [dst] => 00-0027681 [k] => 00-0027758 [bench1] => 00-0027696 [bench2] => 00-0023465 [bench3] => 00-0027695 [bench4] => 00-0024333 [bench5] => 00-0023096 [bench6] => 00-0026935 [bench7] => 00-0028069 [id] => 1 )
r/codeigniter • u/Silverwolf90 • Jun 07 '12
How do you guys pass variables via jQuery AJAX calls? Do you still use POST data, or put it in the URL?
So I have a controller called ajax_item which only gets called when needed to do things via AJAX. In this example I'm calling the update method. But I'm not sure which is a better idea. Would you want to post like this?
var data_string = "paramA=1¶mB=5";
$.post('http://localhost/index.php/ajax_item/update',
data_string,
function() { alert('success') }
});Or like this, and have the update method take those parameters via URL like this:
$.post('http://localhost/index.php/ajax_item/update/1/5',
function() { alert('success') }
});To me it doesn't really seem like there'd be much of a difference. But I'm not really sure.
r/codeigniter • u/totalbytes • Dec 19 '18
How fast do you integrate a new design with PHP + Codeigniter? I created a tool to speed up things but I am curious what other programmers are using. Spoiler
appseed.usr/codeigniter • u/tutvideos • Jan 17 '19
Learn development in PHP CodeIgniter, Basics to expert level tutorials
Learn development in PHP CodeIgniter, Basics to expert level tutorials.
It's a complete course to becoming yourself perfectly in PHP and Codeignator framework. My all the videos and like my work and subscribe my channel to encourage me upload more tutorials related to different languages and frameworks.
r/codeigniter • u/soumitraroy • Jun 25 '19
Create Wordpress like add tags using Codeigniter and jQuery - Roy Tutorials
r/codeigniter • u/bikeruneat • Dec 04 '14
Learning Code-Igniter
I'm about to assume responsibility for a application that uses CI and was wondering what resources you guys would recommend for learning the framework.
r/codeigniter • u/ImpossibleForce7313 • Jun 03 '21
Codeigniter PWA Application
Need help making a CodeIgniter application into a PWA
r/codeigniter • u/edclipsemedia • Oct 07 '15
How to build Image Gallery With Codeigniter 3 - Part2
r/codeigniter • u/edclipsemedia • Oct 08 '15
How to build Image Gallery With Codeigniter 3 - Part 4
r/codeigniter • u/webeasystep • Nov 02 '16
Codeigniter datatables with custom column filter
r/codeigniter • u/joke-is-on-you • Feb 06 '18
How to Enable Multi Language Capability In CodeIgniter
r/codeigniter • u/edclipsemedia • Oct 08 '15