Welcome Guest, Not a member yet? Register   Sign In
Two folders division in CI
#1

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 ?
" If I looks more intelligence please increase my reputation."
Reply
#2

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.
" If I looks more intelligence please increase my reputation."
Reply
#3

(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
Reply
#4

modules
-- module_name
---- controllers
---- config
---- models
---- libraries
---- views
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(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/codeig...sions-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/',
); 
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB