CodeIgniter Forums
Two folders division in CI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Two folders division in CI (/showthread.php?tid=66724)



Two folders division in CI - davy_yg - 11-25-2016

Hello,

I am trying to divide my ci into two folder division admin and site.  Masterlinkci folder has two sub folders inside application folders. 

Admin to contain my backend and site for front end.

Now when I am trying to run the file I get this error messages:


Warning: require_once(C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\masterlinkci\application\site\config/constants.php): failed to open stream: No such file or directory in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\masterlinkci\system\core\CodeIgniter.php on line 70

Fatal error: require_once(): Failed opening required 'C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\masterlinkci\application\site\config/constants.php' (include_path='.;C:\php\pear') in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\masterlinkci\system\core\CodeIgniter.php on line 70


I wonder how to troubleshoot the problem ?


RE: Two folders division in CI - davy_yg - 11-27-2016

I have a quick question regarding HMVC. I already create two folders in modules: admin and site.

Now my question to create HMVC that works do I have to extract codeigniter folders into admin and site OR simply create another MVC folders (model, view and controllers) inside admin and site?

Thanks in advance.


RE: Two folders division in CI - deniscaaa - 11-28-2016

(11-27-2016, 09:02 PM)davy_yg Wrote: I have a quick question regarding HMVC.  I already create two folders in modules:  admin and site.

Now my question to create HMVC that works do I have to extract codeigniter folders into admin and site OR simply create another MVC folders (model, view and controllers) inside admin and site?

Thanks in advance.


index.php add 
$assign_to_config['modules_locations'] = array(
     APPPATH.'site/' => '../site/',

);

admin folder is created only in the index.php file and set application and system from codeigniter
to /admin/index.php add
$assign_to_config['modules_locations'] = array(
     APPPATH.'admin/' => '../admin/',
);


www.mysite.com/admin


RE: Two folders division in CI - InsiteFX - 11-28-2016

modules
-- module_name
---- controllers
---- config
---- models
---- libraries
---- views


RE: Two folders division in CI - wolfgang1983 - 11-28-2016

(11-28-2016, 04:52 AM)deniscaaa Wrote:
(11-27-2016, 09:02 PM)davy_yg Wrote: I have a quick question regarding HMVC.  I already create two folders in modules:  admin and site.

Now my question to create HMVC that works do I have to extract codeigniter folders into admin and site OR simply create another MVC folders (model, view and controllers) inside admin and site?

Thanks in advance.


index.php add 
$assign_to_config['modules_locations'] = array(
     APPPATH.'site/' => '../site/',

);

admin folder is created only in the index.php file and set application and system from codeigniter
to /admin/index.php add
$assign_to_config['modules_locations'] = array(
     APPPATH.'admin/' => '../admin/',
);


www.mysite.com/admin

In config.php as said here

https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc

The Modules::$locations array may be set in the application/config.php file. ie:

PHP Code:
<?php
$config
['modules_locations'] = array(
   APPPATH.'modules/' => '../modules/',
);