Creating my First PHP Framework : Day 2
First things first , i'needed a file (init.php) witch requires all other components of the framework , also all the static variables such as APP and CSS directories so i called it init.php <?php define ( ' ROOT ' , dirname ( __DIR__ )); define ( ' APP ' , ROOT . "/ app /" ); define ( ' WEBROOT ' , " http:// " . $_SERVER [ ' HTTP_HOST ' ] . dirname ( $_SERVER [ ' PHP_SELF ' ]) . " / " ); define ( ' CSS ' , WEBROOT . " css/ " ); define ( ' IMG ' , WEBROOT . " img/ " ); define ( ' JS ' , WEBROOT . " js/ " ); define ( ' DS ' , ROOT . " / " ); require_once ROOT . ' /vendor/autoload.php ' ; require_once APP . ' /core/App.php ' ; require_once APP . ' /database.php ' ; Also i need to require 3 files autoload.php : composer's a...