codeigniter

PHP Framework: Ebay Like Site

Hello all, I am going to be builiding a site like ebay - with all the features of ebay. Please note my payment method is limited to paypal. What would be the best PHP framework to use to build this quickly, efficiently and with the smallest learning curve? I have narrowed down to CodeIgniter as the major contender for this p...

Unit Testing CodeIgniter with Simpletest - very few tests

Hello all! On our development team, we decided to give Unit Testing a try. We use Simpletest. However, it's been a tough road. After a week, I only have created 1 unit test that tests a certain helper file. That's it. The rest (controllers, models, views, libraries) don't have unit tests yet. And I plan to not test a majority of them. Vi...

Code Igniter url routing question (using trailing slashes)

I am brand new to codeIgniter. I am very particular about urls on the sites that I develop. Is it possible to create these sorts of urls? Generally sites I develop have an integrated admin interface as well with new, edit or delete added onto the end of the url following a slash. Here are some hypothetical examples (one with an admin ...

CodeIgniter Routing / Htaccess / URI issues

Hi all, I recently joined a team of devs and I'm trying to get an SVN checked out onto my local machine. Unfortunately, I've run into some issues with links and routing. My local machine is using a WAMP setup. Let's say I have in my controller: function testfunc()($this->load->view('testfunc'); and in my testview view I have ...

Codeigniter Pagination over array instead of Database resultset

I have looked into trying to use the pagination class within codigniter but for my problem I need to paginate over an array of data and not a database table. In my code I create a custom array and then pass that array to the view using the standard $this->load->vars($myarray); $this->load->view('myview', $myarray); Everything works f...

Codeigniter WHERE on "AS" field

I have a query where I need to modify the selected data and I want to limit my results of that data. For instance: SELECT table_id, radians( 25 ) AS rad FROM test_table WHERE rad < 5 ORDER BY rad ASC; Where this gets hung up is the 'rad < 5', because according to codeigniter there is no 'rad' column. I've tried writing this as a cust...

How do I set environment variables in WAMP

Hello, I am trying to get an environment variable to show up in $_ENV in my codeigniter app. How do i do this? ...

perform cURL functions in CodeIgniter

I have to perform import-content functions from remote pages from my website using page urls provided by users. In short what digg, mixx, designfloat, etc do when we submit a story using the url. Only I have to do it with CodeIgniter. I would really appreciate if someone could please tell me the best way to do something like this within ...

Not using $_GET parameters

In working with CodeIgniter, it appears $_GET is disabled by default. I'm wondering why this is. A lot of times, I want to build very long search queries. So for example, I have a form that allows you to search the database by N different fields. In code igniter, the url to display my search result would be: http://mysite.com/field...

Caching large number of pages on php site

I'm involved in a project that will end up creating around 10 million new pages on an existing site. The site, and the new project, are built with CodeIgniter and connecting to MySQL. I've never dealt with a site of this size before, and I'm concerned about how we should handle caching. Has anyone dealt with caching on a PHP site of thi...

Class methods and instance methods in codeigniter, how can I use them?

I am very new to codeigniter but understand OOP and MVC as I do a lot of Rails development. One thing I haven't figured out yet is how to write a class level method in codeigniter and access it in a controller. For example, I have <?php class User_model extends Model { function user_model() { parent::Model(); } ...

Should this function be instance level or class level? ...and how to make it work in codeigniter

In my codeigniter project I have <?php class User_model extends Model { function user_model() { parent::Model(); } // should we use instance method? function get_total_users_count(){ $results = $this->db->query("SELECT * FROM bhr_users GROUP BY userid"); if($results){ return $results->num_row...

Query in code igniter keeps returning a "1"

I am a code igniter noob. I have a controller like the following: <?php class Welcome extends Controller { function Welcome() { parent::Controller(); $this->load->model('usermodel'); } function index() { $res = $this->db->get('users'); die( print_r($res) ); } } I have a table 'users' in m...

In PHP/CodeIgniter how do you calculate Class & Form Rank based on grades for a student?

I have a database table that holds the following grade information for a student: student_id subject_id gpa letter_grade (which is calculated based on gpa, s the best way to do it? ...

html parser codeigniter library?

Does someone here know a html parser library that will work with codeigniter? ...

Can't use Get in CodeIgniter

So I'm using codeigniter and I've had very letter experience with it so far but here's my issue. I have an if statement I've set up that says if (@$_GET['f'] == 'callback') then do something, if not, do something else. So basically my URL ends up looking like this: http://localhost/finalproject/myspacedev/index?f=start and all I get ...

Codeignter form validation failing when it should succeed

I'm building an admin utility for adding a bulk of images to an app I'm working on. I also need to to log certain properties that are associated with the images and then store it all into the database. So basically the script looks into a folder, compares the contents of the folder to records in the database. All of the info must be ...

Code Igniter - print $Controller->session without knowing the key?

Instead of doing the following: print $this->session->userdata('username'); print $this->session->userdata('email'); print $this->session->userdata('phone'); print $this->session->userdata('fax'); //etc... Is there a way to do something like foreach($this->session as $key=>$val) print $key.'-'.$val; Or is it possible to do somethin...

Way to tell if a post came from an ajax call in codeigniter?

Hey SO, I just started using CodeIgniter after using Zend for a while. My new site has a feature where you register through Ajax. In Zend I could use this to check if the incoming POST was through AJAX, and therefore from my site: if(!$this->getRequest()->isXMLHttpRequest()) Is there a piece of code in CodeIgniter that does the sam...

CodeIgniter and JS libraries

Hi So I'm a newbie at this sort of thing - I just started developing with CodeIgniter and I'm trying to integrate javascript libraries. However, I have my .htaccess set up so that all requests get /index.php/ tacked in front of it, which makes it difficult to include files. For CSS I just use a php include to get around this problem and...