Codeigniter 3.1.0 with XHMVC |
(02-15-2016, 03:56 AM)nguyenanhnhan Wrote: Hello XMadMax, One thing is 'Default route', another is 'document_root'. default route is configured in routes.php, in the application, defaults to : $route['default_controller'] = 'welcome'; If you want to change your document_root, edit the apache conf for this domain (mydomain): Code: <VirtualHost *:80>
(02-15-2016, 04:28 AM)XMadMax Wrote:Hello XMadMax,(02-15-2016, 03:56 AM)nguyenanhnhan Wrote: Hello XMadMax, default route with: - MVC: $route['default_controller'] = [controller/method] - HMVC: $route['default_controller'] = [module/controller/method] - So XHMVC : ?? I do not want the URL is too long when first visit website. Ex: http://xhmvc.4amics.com/applications/dem...ser_guide/ instead of http//xhmvc.4amics.com (02-15-2016, 07:31 AM)nguyenanhnhan Wrote:(02-15-2016, 04:28 AM)XMadMax Wrote:Hello XMadMax,(02-15-2016, 03:56 AM)nguyenanhnhan Wrote: Hello XMadMax, Hi, Same as HMVC, if you type 'home', CI will try to find /modules/home/home.php, and a 'index' method If you type home/mainpage, CI will try to find modules/home/mainpage.php with a 'index' method The default_controller must to reside under apps/mytest/application/modules. There is no reason (I think) to have a common module as a 'default' Any other call, the XHMVC tries to load the same name under /common/core/modules.
Helo,
From yesterday, XHMVC for Codeigniter 3.0 is ready to be installed from composer. Also, has been solved some problems, thanks to Vivers for testing. Install: Create a directory in your htdocs path, ex: c:/xampp/htdocs/codeigniter-3-xhmvc Edit a new composer.json: Code: { Use: composer install Added HMVC examples to the Welcome module: Browse to: http://localhost/codeigniter-3-xhmvc/ven...ww/welcome Or: (default_controller) http://localhost/codeigniter-3-xhmvc/ven.../base/www/ Added some XHMVC examples: /apps/base/appication/modules/welcome/config /apps/base/appication/modules/welcome/controllers /apps/base/appication/modules/welcome/helpers /apps/base/appication/modules/welcome/libraries /apps/base/appication/modules/welcome/models /apps/base/appication/modules/welcome/views A welcome 'common' module is available for testing, try to delete any of the folders of apps...welcome to see how common file is loaded if not found in apps. When a apps...welcome part is deleted, remember to try with (because there aren't default_controller in common): http://localhost/codeigniter-3-xhmvc/ven.../base/www/welcome
Default route must to be configured same as CI, in routes.conf:
PHP Code: $route['default_controller'] = 'test'; There is no way to load default route from core/modules. |
Welcome Guest, Not a member yet? Register Sign In |