Category Archives: CodeIgniter

Join in CodeIgniter


AjaxResponse Trait for CodeIgniter 2




Static function in CodeIgniter

In Model (Products_m.php):

In Controller:


Generate Facebook Product Catalog Feed (XML)

Facebook Doc:

CodeIgniter XML Helper:

Sample Code:



Old utf8 char_set could cause unexpected error like

Here is example string:

To solve this, change char set settings in config file of CodeIgniter:


Upload Error Handler

There are 2 configs in php.ini related to upload process:

  • post_max_size
  • upload_max_filesize

If the size of your post is over post_max_size, system could cause an error without any warning and $_POST could be empty for no reason. So it’s important to check post size before you start to process a form submit.

Helper functions:

Other programming issue:


base_url config (https or http)




Codeigniter Cart not working in IE

Chang session setting in config.php:




Get result of stored procedure via PHP

DB account must have “execute” permission!

Stored procedure example:

PHP example: (Codeigniter)