CodeIgniter Forums

Full Version: Propose Directory Structure
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi J.P.
I want to propose the structure of the directory so that when we have several projects we don't need to duplicate the "system" directory.

The structure that I propose is as follows.
- system/
- project/
   - application/
   - writable/
   - public/
- test/
Thanks.
No point...

There is an easy way to make folders as : app2 / public_site2 and that's it..
Writable is not public folder but again you can multiply it

And the only thing that you must touch is App/Config/Paths (in each separate instance) .
You are able to move each app in the structure you showed as well, just set correct paths..

! .env is an issue at this case ..
(10-02-2018, 10:17 PM)sv3tli0 Wrote: [ -> ]No point...

There is an easy way to make folders as : app2 / public_site2 and that's it..
Writable is not public folder but again you can multiply it

And the only thing that you must touch is App/Config/Paths (in each separate instance) .
You are able to move each app in the structure you showed as well, just set correct paths..

! .env is an issue at this case ..

when I put application directory in project_1 directory, BASEPATH cannot be read correctly.

can you provide a configuration example .env for this problem?
Thank for your reply.
At public/index.php you have a call to the app folder (for Config/Paths.php) this path must be set correctly to your app folder (for each separate public folder there should be selected APP folder it can goes automatic but I don't recommend it).
! This should be the only place where the system is not using those Paths.php folders paths, so don't forget to update and folder names inside this Config/Paths.php. after that !

for .env file I am not quite sure .. I think it's hard set to the root folder :/ May be it should be possible to set its path inside config paths as well ? ? ?
(10-03-2018, 01:48 AM)sv3tli0 Wrote: [ -> ]At public/index.php you have a call to the app folder (for Config/Paths.php) this path must be set correctly to your app folder (for each separate public folder there should be selected APP folder it can goes automatic but I don't recommend it).
! This should be the only place where the system is not using those Paths.php folders paths, so don't forget to update and folder names inside this Config/Paths.php. after that !

for .env file I am not quite sure .. I think it's hard set to the root folder :/ May be it should be possible to set its path inside config paths as well ? ? ?

If the directory structure that I propose is approved, we only need to update the basepath definition in system / bootstrap.php.
(10-03-2018, 03:23 AM)titounnes Wrote: [ -> ]
(10-03-2018, 01:48 AM)sv3tli0 Wrote: [ -> ]At public/index.php you have a call to the app folder (for Config/Paths.php) this path must be set correctly to your app folder (for each separate public folder there should be selected APP folder it can goes automatic but I don't recommend it).
! This should be the only place where the system is not using those Paths.php folders paths, so don't forget to update and folder names inside this Config/Paths.php. after that !

for .env file I am not quite sure .. I think it's hard set to the root folder :/ May be it should be possible to set its path inside config paths as well ? ? ?

If the directory structure that I propose is approved, we only need to update the basepath definition in system / bootstrap.php.

1 update vs 2 updates ... it is not big difference for any developer..

And your demand is based on a need which is not typical case. Why it should be the base for CI ?