Skip to content
Advertisement

Tag: codeigniter

What is the best way to make a breadcrumb with Code Igniter?

I wonder what a best way to make a breadcrumb with Code Igniter. 1 : Retrieve the strings with URL example : $this->uri->segment(2) 2 : Do you know another way ? I’d really like to have your opinion Answer Using URL segments is specific to how you have your URL structured – there is not always a 1:1 match. http://forum.codeigniter.com/thread-25372.html?highlight=137949

Excel output with codeigniter

I’m trying to get a report from my codeigniter project in excel, but I am at a complete loss on how to do it. It already works well, just would like the output in excel rather then a page. Any tips/pointers/explanations? thanks! Answer I’ll refer you to this wiki article from the codeIgniter site, or to this tutorial

How to set date.timezone for CodeIgniter to work with php 5.3

When date.timezone in php.ini is commented out, it gives me: A PHP Error was encountered Severity: Warning Message: main(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely

Codeigniter variables from constructor are undefined

I’m using CI’s Auth Tank library to query records for certain users. The variable $user_id = tank_auth->get_user_id(); grabs the user id from the session. I want to pull records where user_id = $user_id. From what I understood, constructors can load variables each time a class is initiated. Sort of like global variables. So I figured I’ll set my $user_id in

CodeIgniter without a Database?

Sorry if this is a simple question, is it possible to load codeigniter without a db setup? I have sess_use_db set to false in the config, I tried renaming database.php to something else but it still wants to load it, I turned active records off also. I tried commenting everything out in the database.php and it said no database settings

Where do you put non-controller classes in codeigniter?

I’ve got a class Widgets. Widgets are made up of Doohickies. I’m never going to need to access Doohickies directly via url — they’re essentially a private class, only used by Widgets. Where do you put your code to define the Doohicky class? In /app/controllers/doohicky.php? in app/controllers/widget.php? somewhere else? Obviously, the former seems cleaner, but it’s not obvious to me

Advertisement