Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged codeigniter
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Credit: 'Jelmer' from CodeIgniter Forums
1. Create preferences.php in your application/config/ directory.
2. Add this to the controller that writes your config values to the database so that it will also write them to the preferences.php config...
2
955
posted 14 years ago by traeregan
Custom CodeIgniter form_validation class to validate uploaded files.
1
817
posted 15 years ago by djenniex
This line can be used to refresh the current page. Submitted by philsturgeon on #codeigniter in the Freenode IRC server.
3
893
posted 15 years ago by AzizLight
Below are two functions I've been using to make event tracking a little easier in CodeIgniter.
Two functions are available, google_analytics() & track_event().
google_analytics() takes one argument and uses it as the UA code for your tracking p...
5
1354
posted 15 years ago by brettbergeron
The below code helps you move your site assets (images, css, javascript) to a public folder inside the application directory of CodeIgniter.
One thing you'll need to do is define ASSETPATH to be the path to the location of your public items. For m...
1
826
posted 15 years ago by brettbergeron
I recently found the need to run multiple CodeIgniter applications inside of a single codebase for development & test purposes. So, I rewrote a few lines of the primary index file (/index.php) to automatically route URLs like subdomain.domain.com to...
3
904
posted 15 years ago by brettbergeron
More info found in the link above, basically, you can replace the $config['base_url'] to the snippet below and you no longer need to set the base url. Useful for making your application more portable.
7
937
posted 15 years ago by DrewDouglass