mrkeck Sharing the Love


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": [
	  "sExtends":    "collection",
	  "sButtonText": 'Save <span class="caret" />',
	    "aButtons":    [ "csv", "xls", "pdf" ]

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
Filed under: codeIgniter, PHP No Comments

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.

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