Archives for : Programming

Codeigniter Model Autoloading

Put this into config/config.php:

Now you can use your model like this:

Of course you can use the old style model too. But you have to use:

or you won’t be able to use it.

Codeigniter: Remove index.php

Go to config/config.php and find this line:

Make it:

Continue Reading >>

Integrating RedBean with Codeigniter

RedBeanPHP is a¬†lightweight,¬†configuration-less ORM¬†library for PHP. Codeigniter is a lightweight and one of the most popular framework for PHP. It comes with Active Records to deal with database interactions. Active Records are very simple to use. However, using an ORM (Object to Relational Mapping) has it’s advantage sometimes. As RedBean claims to be a “configuration-less ORM”, I decided to try that one.

Continue Reading >>

Binding variables with Laravel

Laravel is without any doubt one of the fastest growing PHP frameworks. It uses MVC model. Here’s an example of how to pass a variable or data from the controller to the view file:

Continue Reading >>

A first look into django

Django is the most popular python framework for web development. Here’s a little example of how to create a project in Django.

Continue Reading >>

A first sqlite3 script using Python

Here’s a sample python script that interacts with a sqlite3 database:

Continue Reading >>

Symfony 1.4: alter form field value after form submission

In symfony, when a form is submitted, it goes to action.class.php/processForm()
of associated module.

Continue Reading >>