Questions tagged [codeigniter-2]

CodeIgniter 2.x is an old and no longer supported version of the popular PHP framework. Please refer to the [codeigniter] tag for more information.

Codeigniter 2.x is an old and no longer supported version of the popular PHP framework.

The last 2.x version (2.2.6) was released on October 31st, 2015, which is also the date when security maintenance support for the 2.x version tree was officially ended.

For more up-to-date information on the Codeigniter framework, please refer to the tag.

Links:

3146 questions
6
votes
5 answers

CodeIgniter autoload specific classes

I have created two controllers, the Public_Controller and the Admin_Controller inside ./application/libraries folder, following Phil's Sturgeon example. What I want to do is to autoload the Public_Controller and Admin_Controller specificly, so I…
ltdev
  • 4,037
  • 20
  • 69
  • 129
6
votes
2 answers

Running multiple queries in model in codeigniter

I have this code in model in codeigniter:
user987654321
  • 119
  • 1
  • 1
  • 9
6
votes
1 answer

Codeigniter - Creating a RESTful API

Hey so I have been trying to create a RESTful API using codeigniter 2.1.4. I am an intermediate php programmer and originally debated created the API from scratch. However, after some research, looking through old questions here and on google I…
ScottOBot
  • 839
  • 3
  • 16
  • 37
6
votes
5 answers

CodeIgniter incorrect system path on private server

codeigniter project when uploaded to server gives me the following error. Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php it is working well locally & on 000webhost.com…
Mohammad Sadiq Shaikh
  • 3,160
  • 9
  • 35
  • 54
6
votes
3 answers

Problems up setting up codeigniter with sparks & active record

I am having problems getting my sparks install to work with my codeigniter install here are the steps I took which were as follows: I went to my root of my codeigniter project folder through my PHPCLI to install sparks using the below command php…
user729229
  • 85
  • 1
  • 7
6
votes
2 answers

CodeIgniter rename email attachment file

I have CodeIgniter script for sending email with attachments. $this->ci->email->attach("/path/to/file/myjhxvbXhjdSycv1y.pdf"); It works great, but I have no idea, how rename attached file to some more user-friendly string?
Jiří Valoušek
  • 611
  • 1
  • 7
  • 19
6
votes
1 answer

Codeigniter multiple views in one view

I am working on a web application. This might be a silly question, but I want to know whether I am taking the good approach to this or not. I want to have multiple views on one single view/page. The Codeigniter documentation says that "A view is…
kalafun
  • 3,512
  • 6
  • 35
  • 49
6
votes
4 answers

Always show Previous & Next links using CodeIgniter Pagination Class

Problem Description When I'm at the first page, the previous link is not showing up and so do the next link when I'm at the last page. I set $config['prev_link']='previous' and $config['next_link']='next'. Question How to always present, using the…
Lior Elrom
  • 19,660
  • 16
  • 80
  • 92
6
votes
2 answers

CodeIgniter Controller Method Parameters Issue

I'm using codeigniter 2.1 and I defined a function as follows. public function reset($email, $hash) { } According to MVC architecture and OOPS concept, the function could not execute if I did not pass the parameters in the url. But in codeigniter…
Sanganabasu
  • 943
  • 7
  • 21
  • 39
6
votes
2 answers

Load a view inside another view

I've been using django for some time and I decided to start a new project but this time in Codeigniter, I used to extend the template file in my views and put content inside the {% block content %} block but it seens to be different in…
6
votes
3 answers

REST API with CodeIgniter

I am creating a web-service backend for a mobile app I am developing. (I am an experience Obj-C developer, not a web-designer!) Essentially I would like to use Codeigniter and Phil Sturgeon's RESTful API Server…
Brian
  • 723
  • 1
  • 8
  • 26
6
votes
0 answers

Why doesn't CodeIgniter use native PHP Sessions?

The PHP Framework "CodeIgniter" provides a Session Class, which does not use native PHP-Sessions. Instead, they developped an own Session system using Cookies. On their Website CodeIgniter.com they write the following: Note: The Session class does…
Florian Müller
  • 7,448
  • 25
  • 78
  • 120
6
votes
3 answers

Update query increment field plus 1 codeigniter

I got a problem when trying to increment by 1 on given field in my db. I tried with and without active records. My functions look like this (in my model) function _set_reads($id){ $this->db->set('reads', 'reads+1', FALSE) $this->db->where('id',…
user1724347
  • 253
  • 1
  • 2
  • 13
6
votes
1 answer

How to display error messages in CodeIgniter

In my controller I put this code to check if the shopping cart is empty: if (!$this->cart->contents()){ $this->session->set_flashdata('message', 'Your cart is empty!'); } $this->data['message'] =…
jaypabs
  • 1,519
  • 10
  • 43
  • 62
6
votes
1 answer

vanilla / codeigniter login integration with jsconnect / SSO

Does anyone have any experience using this plugin? i've acquired the client library for php, and setup the appropriate functions in my controller. i get a valid response when i click "test" from the plugin settings page in vanilla, but now i'm…