CodeIgniter Forums
Why do people remove their Application folder from System? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Why do people remove their Application folder from System? (/showthread.php?tid=33235)

Pages: 1 2


Why do people remove their Application folder from System? - El Forum - 08-19-2010

[eluser]Aple[/eluser]
I've seen this happen a lot. Is there a reason people do this?


Why do people remove their Application folder from System? - El Forum - 08-19-2010

[eluser]echoDreamz[/eluser]
I do it because it just doesnt "seem" right. I dont install my application files into the "Windows" directory, there is a place for application files. That and it keeps the CI core logic, and my web apps logic seperated.

I also have about 8 domains that all share 1 CI "core" installation, each domain has their own application directory etc. This is the primary reason.


Why do people remove their Application folder from System? - El Forum - 08-19-2010

[eluser]Vheissu[/eluser]
Building on echoDreamz answer, the upcoming release of Codeigniter 2.0 has the application directory separate from the system directory because the developers obviously realised it made no sense to have application files inside the core system files directory.


Why do people remove their Application folder from System? - El Forum - 08-20-2010

[eluser]Aple[/eluser]
I see. But wouldn't it being removed from the System dir cause a lot of little things to break? Relative paths and all..


Why do people remove their Application folder from System? - El Forum - 08-20-2010

[eluser]JoostV[/eluser]
Don't worry, it does not break anything. You can point to the proper path from index.php.

It makes perfect sense to seperate the frameworks from application-specific code.

Better still, security wise, would be to place both folders outside the webroot, so they cannot be accessed by a browser.


Why do people remove their Application folder from System? - El Forum - 08-20-2010

[eluser]Aple[/eluser]
Thanks Joost! I think I have it working, but can't figure out how to echo the full path it's producing.
I made Applications a sibling of System and set my $application_folder variable to "../application". Is that the standard way of doing it?

Btw, for people following along at home: http://ellislab.com/codeigniter/user-guide/general/managing_apps.html


Why do people remove their Application folder from System? - El Forum - 08-20-2010

[eluser]JoostV[/eluser]
If all is well, you have set the full url in config.php. Call it with
Code:
config_item('base_url');

If you need full paths:
BASEPATH holds the path to system
FCPATH holds path to front controller
APPPATH holds path to the application folder


Why do people remove their Application folder from System? - El Forum - 08-20-2010

[eluser]Aple[/eluser]
Hm, APPPATH is returning: C:\wamp\www\playground\ci/system/../application/ Smile

I'll have to investigate...


Why do people remove their Application folder from System? - El Forum - 08-20-2010

[eluser]JoostV[/eluser]
That path is the same as 'C:\wamp\www\playground\ci\application/'


Why do people remove their Application folder from System? - El Forum - 08-20-2010

[eluser]Aple[/eluser]
Figured it might be, but I just wanted to make sure before I got down the road and something broke and I couldn't figure it out.

Now I'm producing:
BASEPATH: C:\wamp\www\playground\ci/system/
FCPATH: C:\wamp\www\playground\ci\
APPPATH: C:\wamp\www\playground\ci/system/../application/