-
Notifications
You must be signed in to change notification settings - Fork 0
Auto Rooter
How to use the Auto Rooter
It's very easy !
Step 1 - Create the index.php :
Add Rooter.php in your class Folder
Create the index.php like that
use App\Rooter\Rooter;
$uri = (string)$_SERVER['REQUEST_URI'];
$rooter = new Rooter($uri);
$rooter->setSiteName('SITE NAME HERE')
$content = $rooter->root();
$pageTitle = $rooter->getPageTitle();
$desc = $rooter->getPageDesc();
require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'elements/html.php';
Step 2 - Create your first page:
Create the elements folder at the root (not in the public folder)
Create the HTML Base page (
html.php
) with the html code (the header, the footer, the doctype...)
Create the Main page (
home.php
here)
Put your code in this page
Start a server with LAMP / WAMP / PHP Developement Server (
php -S localhost:XXXX
)
See your beautiful page