EllisLab text mark
Advanced Search
7 of 9
7
   
Starting with CodeIgniter setup: suggestions & best practices
Posted: 06 November 2011 06:07 PM   [ Ignore ]   [ # 91 ]   [ Rating: 0 ]
Avatar
Joined: 2007-03-10
451 posts

CodeIgniter came in 2 flavors for a while, it’s just one version again now.

 Signature 

Starting with CodeIgniter setup
Senior dev of FuelPHP

 
Posted: 17 November 2011 08:36 AM   [ Ignore ]   [ # 92 ]   [ Rating: 0 ]
Joined: 2011-03-25
24 posts

xxxxxxxxxxxxxxxxxxxx

 Signature 

http://www.smartweb.cn

 
Posted: 21 November 2011 12:11 PM   [ Ignore ]   [ # 93 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-20
5 posts

Thanks for taking the time to put this together, Jelmer. My best advice would be to read the User Guide over and over again until you know it off by heart. CodeIgniter has some of the best documentation available when it comes to PHP frameworks, so use it to your advantage!

 
Posted: 22 November 2011 07:05 AM   [ Ignore ]   [ # 94 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-05
241 posts
Jelmer - 08 August 2009 02:59 PM

Application & System directory placement

An absolute best practice is to put the system & application directories outside the webroot. If your main index.php is in your FTP in a directory like /public_html/ try if you can upload the system directory to the root as /system/. That way no one can access your PHP files except through the index.php.

Don’t forget to change the values $system_folder and $application_folder in the main index.php file. $system_folder should be relative to the index.php file, $application_folder should be relative to the system folder.

Can someone explain how do to this a bit more? I’ve tried searching the forums, didnt have much luck.


So I’ve got

/system
/application
/public_html/index.php 

and in index.php I’ve got

$system_path '/system';
 
$application_folder '/application'

but it keeps failing saying it cant find system or application folders?

 
Posted: 22 November 2011 08:14 AM   [ Ignore ]   [ # 95 ]   [ Rating: 0 ]
Joined: 2011-02-23
882 posts

Change inside index.php the values to

$system_path '../system';
$application_folder '../application'

that’s because your application and system folder are one level higher located than your index.php which is indicated by that ‘../’. This tells your server to go up one folder to find the corresponding files.

 Signature 

ignited Community Framework (WiP)  |  Read the User’s Guide. It won’t bite.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

CI example .htaccess

 
Posted: 22 November 2011 08:30 AM   [ Ignore ]   [ # 96 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-05
241 posts

awesome - got it working - thanks so much!

 
Posted: 10 December 2011 03:34 PM   [ Ignore ]   [ # 97 ]   [ Rating: 0 ]
Joined: 2010-11-10
1 posts

Quite educative.

Enjoyed the posts!!!

 
Posted: 11 December 2011 08:08 AM   [ Ignore ]   [ # 98 ]   [ Rating: 0 ]
Joined: 2011-12-11
1 posts

nice post, thanks

 
Posted: 12 December 2011 12:31 PM   [ Ignore ]   [ # 99 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-10
18 posts

Love this post, even though it didn’t answer the particular question I had.  wink  I was wondering if anyone had any recommendations for default controller name?  I tend to use “p” (which in my head just stands for “page”).  In certain applications I’ve used “menu”.  Then I use subfolders where there’s a clear functional division (e.g. /user /admin /forum, etc.)

That can leave slightly untidy looking urls: http://domain.com/user/menu/contact/234 - any better practice suggestions out there?  I’ve not yet gone as far as using opt-in controllers (like Fuel does) - should I?

Thanks for the heads up on DataMapper.  I’d tried out Doctrine previously (following Burak Guzel’s guide - alas he seems to be AWOL now) but it seemed a bit of a hassle to set up the initial integration for each application.  Hopefully DataMapper is a bit more seamless.

FWIW, I consciously don’t follow the CodeIgniter style guide - I have near-religious disagreements over the placement of brackets, parentheses and spaces.  But then I’m not contributing any code back to core so I guess it doesn’t matter.  wink

 Signature 

Author of the fantasy thriller, Insensate - available for all ebook readers and iDevices. Find out more here: . Only 99ยข!

 
Posted: 16 January 2012 09:26 AM   [ Ignore ]   [ # 100 ]   [ Rating: 0 ]
Joined: 2012-01-16
1 posts

Hi there.
Nice tips you have provided here. I’ll certainly use them in my project.
Thank you so much.
____________
http://youtomp3.com/
convert youtube to mp3

 
Posted: 24 January 2012 02:03 PM   [ Ignore ]   [ # 101 ]   [ Rating: 0 ]
Joined: 2012-01-24
2 posts

Thanks for the tip, will serve me well for the juegos online system I’m developing.

 
Posted: 25 January 2012 01:56 AM   [ Ignore ]   [ # 102 ]   [ Rating: 0 ]
Joined: 2012-01-02
1 posts

This has been very useful for me, I am starting to learn CodeIgniter properly now.

 
Posted: 29 January 2012 07:26 AM   [ Ignore ]   [ # 103 ]   [ Rating: 0 ]
Avatar
Joined: 2011-02-02
67 posts

Greetings,
Excellent post!

It’s been a couple of years since the original post.  Just wondering if the author would add or change anything?

As I get working on my first real CodeIgniter system, outside the core I’m also adding these elements:
- IonAuth
- GroceryCRUD

One thing I read about a lot as an essential piece is HMVC, but I don’t quite understand it.

Would HMVC be something to add to this topic?

Thanks again for a terrific post!

Matthew

 
Posted: 31 January 2012 03:42 AM   [ Ignore ]   [ # 104 ]   [ Rating: 0 ]
Joined: 2012-01-30
1 posts

As of CI2.0 support for tokens is built in, this is explained on the bottom of the Security class docs.

urine drug test

 
Posted: 04 February 2012 06:29 AM   [ Ignore ]   [ # 105 ]   [ Rating: 0 ]
Avatar
Joined: 2011-03-18
631 posts

great post smile

 Signature 

Bhashkar Yadav
http://www.sidd3.com

 
7 of 9
7