Welcome Guest, Not a member yet? Register   Sign In
Why do people remove their Application folder from System?
#1

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

[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.
#3

[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.
#4

[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..
#5

[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.
#6

[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-gui..._apps.html
#7

[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
#8

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

I'll have to investigate...
#9

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

[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/




Theme © iAndrew 2016 - Forum software by © MyBB