Tag: codeigniter

63 votes
6 answers
1K views
Best method of including views within views in CodeIgniter

I'm starting a large codeigniter project and would like to try to create some reusable 'mini' v

avatar
Solomon
0 1 0 9
asked 07 September, 2021
64 votes
14 answers
1.8K views
Header and footer in CodeIgniter

I really don't enjoy writing in every controller: $this->load->view('templates/header&apo

avatar
Gigi
0 1 0 9
asked 07 September, 2021
57 votes
12 answers
2.3K views
CodeIgniter - how to catch DB errors?

Is there a way to make CI throw an exception when it encounters a DB error instead of displaying a message lik

avatar
User demo
0 1 0 9
asked 07 September, 2021
52 votes
10 answers
1.8K views
How to select rows where column value IS NOT NULL using CodeIgniter's ActiveRecord?

I'm using CodeIgniter's Active Record class to query the MySQL database. I need to select the rows i

avatar
Arline
0 1 0 9
asked 07 September, 2021
61 votes
11 answers
580 views
Inserting NOW() into Database with CodeIgniter's Active Record

I want to insert current time in database using mySQL function NOW() in Codeigniter's active record. The

avatar
Corrin
0 1 0 9
asked 07 September, 2021
62 votes
9 answers
2.8K views
Sending email with gmail smtp with codeigniter email library

<?php class Email extends Controller { function Email() { parent::Controller();

avatar
Solomon
0 1 0 9
asked 07 September, 2021
57 votes
11 answers
772 views
the best way to make codeigniter website multi-language. calling from lang arrays depends on lang session?

I'm researching hours and hours, but I could not find any clear, efficient way to make it :/ I have a co

avatar
Solomon
0 1 0 9
asked 07 September, 2021
62 votes
11 answers
949 views
CodeIgniter - return only one row?

At the moment if I am doing a query on the database that should only return one row, using: ...query stuff...

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
60 votes
6 answers
1.6K views
Handling PUT/DELETE arguments in PHP

I am working on my REST client library for CodeIgniter and I am struggling to work out how to send PUT and DEL

avatar
Benton
0 1 0 9
asked 07 September, 2021
59 votes
11 answers
702 views
DataTables: Cannot read property &apos;length&apos; of undefined

I understand this a popular issue, and I have read all the similar questions here on Stack Overflow and other

avatar
Freida
0 1 0 9
asked 07 September, 2021
58 votes
5 answers
2.1K views
Codeigniter - no input file specified

I am a beginner in Codeigniter and I saw a CI tutorial and was just trying to do a simple thing. I downloaded

avatar
Georgie
0 1 0 9
asked 07 September, 2021
59 votes
6 answers
2.5K views
explain $CI =& get_instance();

Looking through codeigniter's source code, in its helper functions I keep seeing code $CI =& get_ins

avatar
Nereida
0 1 0 9
asked 07 September, 2021
64 votes
5 answers
1.6K views
How to do error logging in CodeIgniter (PHP)

I want error logging in PHP CodeIgniter. How do I enable error logging? I have some questions: What are al

avatar
Don
0 1 0 9
asked 07 September, 2021
50 votes
11 answers
2.3K views
CodeIgniter - accessing $config variable in view

Pretty often I need to access $config variables in views. I know I can pass them from controller to load->v

avatar
Nereida
0 1 0 9
asked 07 September, 2021
57 votes
9 answers
2.5K views
PHP_SELF vs PATH_INFO vs SCRIPT_NAME vs REQUEST_URI

I am building a PHP application in CodeIgniter. CodeIgniter sends all requests to the main controller: index.p

avatar
Nidia
0 1 0 9
asked 07 September, 2021
58 votes
15 answers
848 views
How to print SQL statement in codeigniter model

I have a sql statement in my model, I then say $query = $this->db->query($sql, array(fields, fields1);

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
61 votes
27 answers
840 views
How to remove "index.php" in codeigniter&apos;s path

How do I remove the "index.php" sticking out in every path in codeigniter somewhere in the center? I want clea

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
61 votes
11 answers
2.1K views
CodeIgniter: How to get Controller, Action, URL information

I have these URLs: http://backend.domain.com/system/setting/edit/12 http://backend.domain.com/product/edit/1

avatar
Gigi
0 1 0 9
asked 07 September, 2021
52 votes
13 answers
2.1K views
How to insert multiple rows from array using CodeIgniter framework?

I'm passing a large dataset into a MySQL table via PHP using insert commands and I'm wondering if it

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
55 votes
14 answers
2.8K views
Where do I put image files, css, js, etc. in Codeigniter?

Where is it acceptable to put css folders and image file folders? I was thinking inside the view folder? Howev

avatar
Joseph
0 1 0 9
asked 07 September, 2021