Welcome To Snipplr


Everyone's Recent Snippets Tagged codeigniter



1 2 3 Next »
0 254 posted 11 years ago by wilburhimself
Put this at the top of your CodeIgniter models, controllers, libraries and helpers to restrict direct access to them.
1 710 posted 11 years ago by AzizLight
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 406 posted 12 years ago by traeregan
0 304 posted 12 years ago by kerpunk
Custom CodeIgniter form_validation class to validate uploaded files.
1 358 posted 12 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 369 posted 12 years ago by AzizLight
/!\Notice: Change the ci_dir to wherever your ci folder is on line 3. /!\ Usage: ci [name of project] Gives the project a name based on the current date if the user didn't provide one. Option to move the app directory outside of the system dire...
2 317 posted 12 years ago by AzizLight
3 453 posted 12 years ago by nkm
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 612 posted 12 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 367 posted 12 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 341 posted 12 years ago by brettbergeron
1 328 posted 12 years ago by pdswan
4 422 posted 12 years ago by pdswan
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 400 posted 12 years ago by DrewDouglass
2 311 posted 12 years ago by justinseiter
8 367 posted 12 years ago by michaelfox
2 345 posted 12 years ago by jtkendall
1 392 posted 13 years ago by plasticated
10 1948 posted 13 years ago by koorb
1 2 3 Next »