Welcome Guest, Not a member yet? Register   Sign In
Codeigniter the best and easy to use php framework I have ever seen
#12

[eluser]xwero[/eluser]
Code:
// index.php
define('PUBLIC_DIR',dirname(__FILE__).'/');
define('CONTROLLER_DIR',PUBLIC_DIR.'controllers/');
define('VIEWS_DIR',PUBLIC_DIR.'views/');

if(file_exists(CONTROLLER_DIR.$_SERVER['PATH_INFO'].'.php'))
{
   include(CONTROLLER_DIR.$_SERVER['PATH_INFO'].'.php');
}

if(file_exists(VIEWS_DIR.$_SERVER['PATH_INFO'].'.php'))
{
   include(VIEWS_DIR.$_SERVER['PATH_INFO'].'.php');
}
Models are a segmentation that isn't essential to build a page. In many framework it's 'hidden' inside the controllers.


Messages In This Thread
Codeigniter the best and easy to use php framework I have ever seen - by El Forum - 05-12-2009, 08:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB