For a PHP MVC application, what is the difference of the job of the index.php
file and front-controller? Is the front-controller in the index.php
,
Index.php should initialize the application and call something that deciphers the route into controller and action, and runs them. Look at Yii, Symfony, CodeIgniter, CakePHP, see what they do. All slightly different but same principle.
An example from Yii's index.php to make the point:
run();
$config gets passed to the web application, which serves as the front controller.