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

[eluser]NachoF[/eluser]
I dont even understand how anyone could use MVC without using a framework....
#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.
#13

[eluser]Cro_Crx[/eluser]
[quote author="NachoF" date="1242154262"]I dont even understand how anyone could use MVC without using a framework....[/quote]

Well you could mock up some quick php files with includes to sort that out for you with only a few lines of code, but then i guess your technically creating a framework (although a very simple one).




Theme © iAndrew 2016 - Forum software by © MyBB