A simple Codeigniter library to “slugify” your URL.
Read the rest of this entry »
September 28th, 2009 pctips Posted in PHP, Tips 2 Comments »
A simple Codeigniter library to “slugify” your URL.
Read the rest of this entry »
January 20th, 2009 pctips Posted in PHP, Tips 1 Comment »
Ever wanted to extract text from a Microsoft Word document with PHP and COM? It’s not so hard as it seems. Create a Word document on your computer and use this piece of code:
Read the rest of this entry »
October 21st, 2008 pctips Posted in PHP, Tips 34 Comments »
If you are using Codeigniter for developing PHP applications you noticed the “index.php” part of the URL of your application.
You can remove it by doing two simple things:
1. Edit the config.php from .system/application/config/ and change the $config['index_page'] like this: $config['index_page'] = “”;
2. Create a .htaccess page in the root of the Codeigniter application:
RewriteEngine On
RewriteBase /CIapplication
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Edit line two in order to suit your setup.
Now you will be able to use: http://server.com/CIapplication/controller instead of: http://server.com/CIapplication/index.php/controller
In case this is not working, modify this line in config.php:
$config['uri_protocol'] = "AUTO";
and change it to:
$config['uri_protocol'] = "REQUEST_URI";
May 28th, 2008 pctips Posted in PHP 5 Comments »
This days I was searching for an authentication system to use with CodeIgniter for a little application I want to make.
I read a little about FreakAuth, but it was too much for my needs. So I decided to look at the Derek Allard’s Bamboo Invoice System.
Read the rest of this entry »