I'm using code modules, and when i need a module in another module, use "use modules\name\controller-or-model" ...
When need to specify a path for each of them, i create a separate Routes.php inside each module...
But how do specify the default module? When i write on the site https: //example.com/about-how-i-spent-the-summer
I indicate in the application/Config/Routes.php
Code:
$routes->setDefaultController('Article');
$routes->setDefaultMethod('getArticle/$1');
When it does not find any of the existing modules, it accesses the default module. But this does not happen.
How to set the default value correctly?
Or specify a list of reserved addresses?
Or do you specify the path in the controller in cases and if the article is not found?
Same in the subject of routes, i want to ask how to remove the index.php when sending a form?
Example:
Code:
echo form_open('controller/method',array('...'));
...
http: //example.com/index.php/controller/method
In other cases, there is no index.php (because it is removed by the .htaccess).
P.s
Also specified the default controller and method in the modules/default_module/config/Routes.php , but this, for some reason, did not work either...