Autorun a controller with CI |
[eluser]Fatih[/eluser]
Dears, I coded a MVC structure for create a rss.xml file which is updated one time in every day, on a rss subdirectory. I need to create a mechanism to perform every loading on my website like this: 1. Check the rss.xml file date with system date. 2. If system date is new than rss.xml file date, run controller file with MVC structure. How can I perform this?
[eluser]Fatih[/eluser]
Thanks xwero. But my problem is not to check file creation or modification date. My problem is how I can start the controller file on loading a every different pages. When my website is loaded, I have to run a controller file. Then this file will be check this modification date and If the system date is new than rss.xml file date, create new one on background. But I cannot find the starter mechanism
[eluser]Fatih[/eluser]
I read about hooks before. But it cannot be applicable for MVC structure. My code is applicable is MVC structure. If it is not possible to start a MVC structure in every loaded pages, I will change my codes to hooks.
[eluser]ontguy[/eluser]
Using Michael Wales dev pack you could have a function in the your Public_Controller; http://www.michaelwales.com/2008/01/my-c...-dev-pack/. Every controller that extends Public_Controller would run that function. application\libraries\MY_Controller.php Code: class Public_Controller extends Controller { application\controllers\feed.php Code: class Feed extends Public_Controller { application\controllers\page.php Code: class Page extends Public_Controller { |
Welcome Guest, Not a member yet? Register Sign In |