codeigniter

PHP development environment

I normally work on Python projects and we have a good tool called virtualenv for setting up project environments. Does something similar exist for PHP? I have not been able to find one. ...

Managing External and Internal Libraries in Codeigniter with PEAR

I want to start using more libraries for my codeigniter project, but I am weary of having them all in my vcs or having to manually manage versions of the libraries. I've recently found this PEAR Guide but I don't see anything about existing codeigniter libraries being available through this system. Does a CI specific PEAR repo exist and ...

How to execute a function at a certain date in a web application ?

I am on a project using php and codeigniter framework. I want to make changes in the database every 3 months. The problem is I don't know how to do it with PHP. I can activate a function when a user access a page, but I want it to be self-executed at certain date. ...

How do I add CodeIgnitor System folder to Eclipse Project - Ubuntu

So I'm pretty new to Ubuntu and even newer to Eclipse. I am trying to get started with the PHP MVC framework, CodeIgnitor. I am using the following article to setup my dev environment: http://hetal.wordpress.com/2009/09/04/working-with-eclipse-and-code-igniter/ I am trying to add the CI 'System' folder to a new project in Eclipse. I am ...

Experience with CodeIgniter 2 vs Kohana?

Derek Allard recently announced that new projects should use CodeIgniter 2.0 whose code is well baked and it is fully PHP5. What concerns me though is the process seems ad-hoc, there was no beta though he recommends this as being stable for all future code and it is still making updates off 1.x instead of a rewrite. There is also littl...

Textmate snippet to add file name and path in comment?

I'm using an existing snippet in Textmate to reduce the repetition of creating controllers and models. The snippet works great, but I'd love to add a comment to the end of each file. For example: /* End of file filename.php */ /* Location: ./system/application/controllers/filename.php */ The first line is easy: /* End of file ${TM_...

codeigniter active record delete function not working

I have a function written to delete entries from a table called stack. I have written similar function for other tables and it works. For this its not working, but no errors too. How can i find out whts wrong? Controller entry: function delete_tag($id) { $this->Mrestaurant->delete_tag($id); echo 'deleted!'; ...

CodeIgniter creating thumbnails with one black pixel in the top left corner

Warning: I don't have much experience with CodeIgniter and I am updating a site originally create by another developer. For some reason the CodeIgniter image class is creating thumbnails with a black pixel in the top left corner. Here is an example: This only seems to happen in production (this site is being hosted on a super lame s...

resize() not working using Image manipulation class

Hi all, I’ve been reading the docs and trying everything to make thumbs out of uploaded images but I can’t seem to find the problem. Images are uploaded and saved correctly but thumbs are not, it fails with no error output. This is the code I’m using: $data = $this->upload->data(); $config_image['image_library'] = 'gd'; $config_image[...

How do I make an image an anchor in CodeIgniter?

I have read other threads on how to do this and they do not work for me. Can someone tell me how to make an image a anchor in CI? I have tried these: <li><?php echo anchor("Home",img("../application/images/Home_up.png")); ?></li> and <li><?php echo anchor("Home",img("src"=>"../application/images/Home_up.png")); ?></li> ...

Syntax Highlighter putting new lines randomly (or maybe after every symbol).

I am using a simple implementation of Syntax Highlighter for a blog written in CodeIgniter. Here is the link http://code.angad.sg/index.php/blog/test Not sure why is this happening. I am not pasting the source code for the file; you can do a Ctrl+U on the link. Thanks :) ...

Best way to include view within view in Codeigniter template using Dwoo?

I am using Codeigniter 1.7.2 and Phil Sturgeon's wonderful Dwoo wrapper which allows me to use the Dwoo template library in Codeigniter - http://philsturgeon.co.uk/code/codeigniter-dwoo I have a small question regarding the inclusion of other view template files within my template files. Say for example I have a dashboard.php file and I...

CodeIgniter MySQL Query not returning any data, even though there definitely is data to be returned!

Hi there! I have a CI Model set up with this function and ActiveRecord: function get_open_competitions() { $this->db->select('*, TO_DAYS(closingdate) - TO_DAYS(CURDATE()) AS days') ->from('challenges') ->where('closingdate >','CURDATE()') ->order...

Problem passing variable from javascript to controller Codeigniter

I'm struggling with this and just can't seem to make it work. Need to pass the current users date (cdate) variable to my controller and in spite my alert windows shows the correct value, that value never reaches the controller. Here's the javascript code: $(document).ready(function() { $('#submit').click(function() { v...

Using models in CodeIgniter...

Can somebody explain to me when it's a good practice to use models in CI? An article in wikipedia was referring to CI models as "entirely optional and are rarely needed" is that true in any way?thanks in advance! ...

CodeIgniter PHP framework in commercial project

Is it possible to use CodeIgniter framework in commercial project and distribute it ? ...

"Remember me" functionality in Code Igniter

Its been a few months since I've seen any questions regarding this, but I wonder if anyone yet has found a solution / written a helper / model to solve this dilemma inside Code Igniter, rather than stray outside of its built-in sessions. Essentially, a login form is provided for the user, where they will enter their username or e-mail a...

Code Igniter POST Variable

Hi Everyone! I am brand new to Code Igniter but I can't seem to find a way to do this in the documentation, In normal PHP you can retrieve the contents of the entire POST variable like this $_POST = $postedVars But I can't seem to find something that does this in the same manner, I've tried $arr = $this->input->post; and $arr = $t...

Does loading a view effectively stop a controller in CodeIgniter?

Would the following code in a controller prevent the nextFunction() from running? $this->load->view('foo'); nextFunction(); ...

Cannot store checkbox values in array to database for some reason!

Hi I am having an incredibly hard time with what should be a simple issue. As of CodeIgniter 1.7, '$this->input->post();' supported arrays but I cannot for get the values into the array for some reason. I have 7 check boxes that store into an array 'services[]' as you can see by this example view: <?php $servicesdata = array ( ...