CodeIgniter PHP QuickStart on OpenShift
PHP Other
Pull request Compare This branch is 23 commits ahead of gshipley:master.
Latest commit 8ea6d2f Mar 24, 2015 @bparees bparees Merge pull request #7 from luciddreamz/master
Updates CI to 2.2.1, re-structures project to match CI 3.0 QuickStart

CodeIgniter on OpenShift

This QuickStart was created to make it easy to get started with CodeIgniter 2 on OpenShift.

CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications. CodeIgniter 2.x is the legacy version of the framework. The current version (2.2.1) came out in January, 2015.

The simplest way to install this application is to use the OpenShift QuickStart. If you'd like to install it manually, follow these directions.

OpenShift Considerations

These are some special considerations you may need to keep in mind when running your application on OpenShift using this QuickStart.

.htaccess Configuration

The .htaccess file has been pre-configured to remove trailing slashes and index.php from URLs (based on typical CodeIgniter best-practices).

Handling Assets (CSS, fonts, images, and JavaScript)

Deciding where to store your asset files isn't clear with CodeIgniter. Accordingly, this QuickStart is pre-configured with an assets directory for you to store your custom fonts, images, javascripts, and stylesheets.

We've also extended the base HTML and URL helper files to make using assets stored in the assets directories easy.

URL Helper

The URL Helper file contains functions that assist in working with URLs.

ADDED Asset URL - returns the URL of your assets directory. Example:

echo asset_url();

Or, with a URI:

echo asset_url('images/logo.png'); 

HTML Helper

The HTML Helper file contains functions that assist in working with HTML.

UPDATED Img - Lets you create HTML tags. Updated to automatically prepend 'assets/images/' to path when necessary. Example:

echo img('picture.jpg');
// <img src="" />

UPDATED Link Tag - Lets you create HTML tags (mostly for stylesheets). Updated to automatically prepend 'assets/stylesheets/' to path when necessary and rel="stylesheet". Example:

echo link_tag('styles.css');
// <link src="" rel="stylesheet" type="text/css" />

ADDED Script Tag - Lets you create HTML