mrkeck Sharing the Love

8Jan/140

TableTools in CodeIgniter

The key is using

"sSwfPath": "<?php echo base_url(JS.'media/swf/copy_csv_xls_pdf.swf');?>"

and store the "media/swf/copy_csv_xls_pdf.swf" in the resources JS folder.

"oTableTools": {
  "sSwfPath": "<?php echo base_url(JS.'media/swf/copy_csv_xls_pdf.swf');?>",
     "aButtons": [
	"copy",
	"print",
	{
	  "sExtends":    "collection",
	  "sButtonText": 'Save <span class="caret" />',
	    "aButtons":    [ "csv", "xls", "pdf" ]
	}
     ]
}
22Apr/130

Default Timezone CodeIgniter

Add this to index.php in the root of the site under the Error Reporting section

//Change America/New_York to your timezone
date_default_timezone_set('America/New_York');
Filed under: codeIgniter, PHP No Comments
15Dec/120

Page not Found CodeIgniter

Check that you have .htaccess in the root and if are using a sub-directory off the root that you have that in .htaccess.

#codeIgniter
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
    RewriteEngine On
 
    # my url is http://localhost/mySubFolder
    RewriteBase /mySubFolder/
    # set your own
    #RewriteBase /
...
Filed under: codeIgniter No Comments