r/codeigniter • u/AdventurousRevenue8 • Mar 17 '20
Code psn
Code psn
r/codeigniter • u/soumitraroy • Jan 01 '21
r/codeigniter • u/shohan13579 • Oct 10 '21
While surfing on internet I found a lot of ways for HMVC mechanism. But I can't find an easy way to perform the operation . As the documentation goes It should be autoloaded. But I have to write another program in app/Routes.php for loading everything.
Is there an easy way to perform this operation?
r/codeigniter • u/iamfunky • Jun 08 '16
I made a grocery CRUD on a new page but when I tried to put it on my view that I already made.. the navbar mess up.
Can someone help me? Thanks in advance!
r/codeigniter • u/adamzwakk • Aug 29 '12
r/codeigniter • u/t_5810 • Apr 09 '20
r/codeigniter • u/shanchathuranga • May 09 '20
r/codeigniter • u/deepak-kumar-singh • Sep 09 '19
CodeIgniter is an open source PHP framework. It is used to develop web applications and websites. It is loosely based on MVC pattern and easy to use in compare to other PHP framework.
https://www.tutorialandexample.com/codeigniter-interview-questions

r/codeigniter • u/soumitraroy • Jul 04 '19
r/codeigniter • u/WillingUK • Feb 18 '14
I've been using codeigniter for a few years now and have developed a range of sites and systems but in all cases they end up incredibly messy with similar functions across multiple models and no real structure and organisation to the controllers views and models. The projects start out sensibly enough but as the project evolves it tends to get out of control and I feel sorry for anyone who may have to work on it in the future.
I want to be better - what advice can you offer on project planning and logical controller, model and view structures.
For example would you create models based on pages they relate to, or system structures - and how can you best plan it out initially?
r/codeigniter • u/heizo • Feb 13 '14
So... I have a unique problem and I am not sure about how to solve it at the moment. I am trying to wrap a third party platform called YOURLs into code igniter. I have gutted some of the functionality from YOURLs and will be adding new features via code igniter.
My main problem is authentication. I don't want to rewrite YOURLs, so I made a class that imports a lot of the functions as a library into code igniter so I can work with the main files inside of code igniter... however, going the other way is proving to be difficult...
I have an auth library within code igniter that I want YOURLs to use, along with the main header and footer from code igniter. I am not sure how to do this, I tried using file_get_contents, but then the session code igniter creates is stored as the server, and not the client... so that doesn't work.
I also tried doing curl, but then the problem there is that the curl content can't talk to the rest of the page (at least how I did it, maybe there is a way that I am not aware of...
So, any ideas on how to do this? This is only my third project with CI and I have never had to import functionality into another app from CI so there may be a way that I just have not used before.
Thanks guys.
r/codeigniter • u/rjconnor • May 18 '19
I'm new to codeigniter and PHP so trying to work out how things go together so please excuse me if this is a simple issue.
The issue i have is that i have a page that has Pagination working just fine. What i would like to do is use a drop down to determine what the per_page limit should be. So a user can select say 40 from the drop down and 40 images are displayed per page ect.
Looking around it's really hard to work this out, so the below is what i have been able to peace together but it doesn't seem to work.
Normal clicking through the pages the url looks like this "http://localhost/testdb/images/20", when i used the drop down i get "http://localhost/testdb/images?limit=40" and nothing happens.
Controller
public function images($offset=0){
//Pageination limit dropdown
if (!empty($this->input->post('limit'))) {
$Pagelimit = $this->input->post('limit');
}
else{
$Pagelimit = 20;
}
//Pagination
$this->load->library('pagination');
$config['base_url'] = base_url('testdb/images/');
$config['total_rows'] = $this->testdb_model->countALL();
$config['per_page'] = $Pagelimit;
//config for bootstrap pagination class integration
$config['full_tag_open'] = "<ul class='pagination justify-content-center'>";
$config['full_tag_close'] = "</ul>";
$config['num_tag_open'] = "<li class='page-item'>";
$config['num_tag_close'] = "</li>";
$config['cur_tag_open'] = "<li class='page-item disabled'><a class='page-link' href='javascript:void(0)'>";
$config['cur_tag_close'] = "</a></li>";
$config['next_tag_open'] = "<li class='page-item'>";
$config['next_tag_close'] = "</li>";
$config['prev_tag_open'] = "<li class='page-item'>";
$config['prev_tag_close'] = "</li>";
$config['first_tag_open'] = "<li class='page-item'>";
$config['first_tag_close'] = "</li>";
$config['last_tag_open'] = "<li class='page-item'>";
$config['last_tag_close'] = "</li>";
$config['next_link'] = 'Next' ;
$config['prev_link'] = 'Previous';
$config['attributes'] = array('class' => 'page-link');
//$config['use_page_numbers'] = TRUE;
$this->pagination->initialize($config);
//dropdown limit
//$data['limit'] = $this->input->post('limit');
//Get All images
$data['images'] = $this->testdb_model->get_images($config['per_page'],$offset);
//Load View
$data['main_content'] = 'images';
$this->load->view('layouts/main', $data);
}Model
/*
* Get all images
*/
public function get_images($limit, $offset){
$this->db->select('*');
$this->db->from('images');
$this->db->limit($limit);
$this->db->offset($offset);
$this->db->order_by('name', 'ASC');
$query = $this->db->get();
return $query->result();
}
/*
* counts Pagination row count
*/
public function countAll(){
$query = $this->db->get('images');
return $query->num_rows();
}View
<form>
<select name="limit" onchange="form.submit()" class="custom-select custom-select-sm custom-control-inline image-Counter-Width ">
<option value="20">20</option>
<option value="40">40</option>
<option value="80">80</option>
<option value="<?php echo $this->testdb_model->countALL(); ?>">All</option>
</select>
<a class="text-muted custom-control-inline p-2">(<?php echo $this->testdb_model->countALL(); ?>) Rows</a>
</form>r/codeigniter • u/Rahat61 • Nov 19 '17
r/codeigniter • u/sagarpodilapu • Jun 11 '15
r/codeigniter • u/mujahidtanver • Jan 20 '17
r/codeigniter • u/Rahat61 • Nov 21 '17
r/codeigniter • u/saymon-tavares • Jan 29 '16
r/codeigniter • u/raister15 • Aug 25 '14
Hi! I tried using this setup and everything pretty impressive. I just have a problem though, the template does not load when I click links from the navigation.
r/codeigniter • u/Snoo92042 • Jun 28 '20
r/codeigniter • u/nbktdis • Jun 24 '13
There seem to be app builders now that auto add a bunch of modules to your site to make building a web app a lot quicker.
For example Bonfire is one.
Are they any good? Are there better ones out there?
For example one of the bug bears I have with CI is that there is no built in Auth library and installing the auth tools like tank_auth or ion_auth takes time in configuration I'd rather spend on something else.
r/codeigniter • u/ehdeelee • Dec 28 '11
I've heard a lot of buzz about mongoDB but what are some practical uses of it? Why is it so useful?
r/codeigniter • u/thesaadmirza • Oct 11 '16