In my site I have a folder called module. It has two sub-folders called module1 and module2. Both of them have a index.php page. My site is developed in CodeIgniter.
In module1/index.php I have the following code:
<?php
$module_name = "module1";
$module_type = "test";
?>
In module2/index.php I have the following code:
<?php
$module_name = "module2";
$module_type = "test";
?>
Then I have a model function checktest(). In that function I want to get the module1 and module2 name values when $module_type = test.
How can I do this?
Not sure I understand the question, but instead of a module folder you should make a controller named Module and have two functions in that class named module1 and module2. Then make a third function that compares the two.