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.
These are some special considerations you may need to keep in mind when running your application on OpenShift using this QuickStart.
.htaccess file has been pre-configured to remove trailing slashes and
index.php from URLs (based on typical CodeIgniter best-practices).
Deciding where to store your asset files isn't clear with CodeIgniter.
Accordingly, this QuickStart is pre-configured with an
assets directory for
We've also extended the base HTML and URL helper files to make using assets stored in the assets directories easy.
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(); // http://example.com/assets/
Or, with a URI:
echo asset_url('images/logo.png'); // http://example.com/assets/images/logo.png
The HTML Helper file contains functions that assist in working with HTML.
echo img('picture.jpg'); // <img src="http://example.com/assets/images/picture.jpg" />
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="http://example.com/assets/stylesheets/styles.css" rel="stylesheet" type="text/css" />
ADDED Script Tag - Lets you create HTML